Skip to content

Commit 06be85c

Browse files
authored
Added 'thens' to conform with given_when_then format
1 parent a7276eb commit 06be85c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,34 @@ public class SimpleDateFormatUnitTest {
1818
private static final Logger logger = Logger.getLogger(SimpleDateFormatUnitTest.class.getName());
1919

2020
@Test
21-
public void givenSpecificDate_whenFormatted_checkFormatCorrect() throws Exception {
21+
public void givenSpecificDate_whenFormatted_thenCheckFormatCorrect() throws Exception {
2222
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
2323
assertEquals("24-05-1977", formatter.format(new Date(233345223232L)));
2424
}
2525

2626
@Test
27-
public void givenSpecificDate_whenFormattedUsingDateFormat_checkFormatCorrect() throws Exception {
27+
public void givenSpecificDate_whenFormattedUsingDateFormat_thenCheckFormatCorrect() throws Exception {
2828
DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT);
2929
assertEquals("5/24/77", formatter.format(new Date(233345223232L)));
3030
}
3131

3232
@Test
33-
public void givenStringDate_whenParsed_checkDateCorrect() throws Exception{
33+
public void givenStringDate_whenParsed_thenCheckDateCorrect() throws Exception{
3434
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
3535
Date myDate = new Date(233276400000L);
3636
Date parsedDate = formatter.parse("24-05-1977");
3737
assertEquals(myDate.getTime(), parsedDate.getTime());
3838
}
3939

4040
@Test
41-
public void givenFranceLocale_whenFormatted_checkFormatCorrect() throws Exception{
41+
public void givenFranceLocale_whenFormatted_thenCheckFormatCorrect() throws Exception{
4242
SimpleDateFormat franceDateFormatter = new SimpleDateFormat("EEEEE dd-MMMMMMM-yyyy", Locale.FRANCE);
4343
Date myWednesday = new Date(1539341312904L);
4444
assertTrue(franceDateFormatter.format(myWednesday).startsWith("vendredi"));
4545
}
4646

4747
@Test
48-
public void given2TimeZones_whenFormatted_checkTimeDifference() throws Exception {
48+
public void given2TimeZones_whenFormatted_thenCheckTimeDifference() throws Exception {
4949
Date now = new Date();
5050

5151
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEEE dd-MMM-yy HH:mm:ssZ");

0 commit comments

Comments
 (0)