@@ -18,34 +18,34 @@ public class SimpleDateFormatUnitTest {
18
18
private static final Logger logger = Logger .getLogger (SimpleDateFormatUnitTest .class .getName ());
19
19
20
20
@ Test
21
- public void givenSpecificDate_whenFormatted_checkFormatCorrect () throws Exception {
21
+ public void givenSpecificDate_whenFormatted_thenCheckFormatCorrect () throws Exception {
22
22
SimpleDateFormat formatter = new SimpleDateFormat ("dd-MM-yyyy" );
23
23
assertEquals ("24-05-1977" , formatter .format (new Date (233345223232L )));
24
24
}
25
25
26
26
@ Test
27
- public void givenSpecificDate_whenFormattedUsingDateFormat_checkFormatCorrect () throws Exception {
27
+ public void givenSpecificDate_whenFormattedUsingDateFormat_thenCheckFormatCorrect () throws Exception {
28
28
DateFormat formatter = DateFormat .getDateInstance (DateFormat .SHORT );
29
29
assertEquals ("5/24/77" , formatter .format (new Date (233345223232L )));
30
30
}
31
31
32
32
@ Test
33
- public void givenStringDate_whenParsed_checkDateCorrect () throws Exception {
33
+ public void givenStringDate_whenParsed_thenCheckDateCorrect () throws Exception {
34
34
SimpleDateFormat formatter = new SimpleDateFormat ("dd-MM-yyyy" );
35
35
Date myDate = new Date (233276400000L );
36
36
Date parsedDate = formatter .parse ("24-05-1977" );
37
37
assertEquals (myDate .getTime (), parsedDate .getTime ());
38
38
}
39
39
40
40
@ Test
41
- public void givenFranceLocale_whenFormatted_checkFormatCorrect () throws Exception {
41
+ public void givenFranceLocale_whenFormatted_thenCheckFormatCorrect () throws Exception {
42
42
SimpleDateFormat franceDateFormatter = new SimpleDateFormat ("EEEEE dd-MMMMMMM-yyyy" , Locale .FRANCE );
43
43
Date myWednesday = new Date (1539341312904L );
44
44
assertTrue (franceDateFormatter .format (myWednesday ).startsWith ("vendredi" ));
45
45
}
46
46
47
47
@ Test
48
- public void given2TimeZones_whenFormatted_checkTimeDifference () throws Exception {
48
+ public void given2TimeZones_whenFormatted_thenCheckTimeDifference () throws Exception {
49
49
Date now = new Date ();
50
50
51
51
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ("EEEE dd-MMM-yy HH:mm:ssZ" );
0 commit comments