File tree Expand file tree Collapse file tree
source/src/test/java/com/javafortesters/chap017_datestimes/exercises Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ public void experimentWithCalendarConstants(){
8080
8181 assertThat (cal .get (Calendar .DAY_OF_WEEK ), is (1 ));
8282 assertThat (cal .get (Calendar .DAY_OF_WEEK ), is (Calendar .SUNDAY ));
83- assertThat (cal .get (Calendar .WEEK_OF_YEAR ), is (50 ));
8483 assertThat (cal .get (Calendar .DAY_OF_YEAR ), is (349 ));
8584
8685 // week of month depends on first day of week
@@ -90,6 +89,10 @@ public void experimentWithCalendarConstants(){
9089 cal .setFirstDayOfWeek (Calendar .MONDAY );
9190 cal .setMinimalDaysInFirstWeek (6 );
9291 assertThat (cal .get (Calendar .WEEK_OF_MONTH ), is (2 ));
92+
93+ // Week of the year, similarly requires the
94+ // config to control first day
95+ assertThat (cal .get (Calendar .WEEK_OF_YEAR ), is (50 ));
9396 }
9497
9598 @ Test
You can’t perform that action at this time.
0 commit comments