Created
September 18, 2013 20:42
-
-
Save unclejamal/6615367 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void saysTheCurrentTime() throws Exception { | |
givenTheCurrentTimeIs("20:15"); | |
whenAUserChecksTheTime(); | |
thenTheUserSees("It's currently 20:15!"); | |
} | |
private void givenTheCurrentTimeIs(String currentTime) throws ParseException { | |
Date currentTimeAsDate = new SimpleDateFormat("HH:mm").parse(currentTime); | |
clock.setNow(currentTimeAsDate); | |
} | |
private void whenAUserChecksTheTime() { | |
actualApplicationTime = timeExpertUser.checkCurrentTime(); | |
} | |
private void thenTheUserSees(String expectedApplicationTime) { | |
assertEquals(expectedApplicationTime, actualApplicationTime); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment