@Test public void test_localTimeAsTime_get_set_doesnt_mutate() { DateStuff ds = new DateStuff(); LocalTime lt = new LocalTime(18, 19, 20, 123); ds.setALocalTimeAsTime(lt); LocalTime dt1 = ds.getALocalTimeAsTime(); assertEquals(lt, dt1); }
@Test public void test_localDateTime_get_set_doesnt_mutate() { DateStuff ds = new DateStuff(); LocalDateTime ldt = new LocalDateTime(2007, 12, 31, 18, 19, 20, 123); ds.setALocalDateTime(ldt); LocalDateTime dt1 = ds.getALocalDateTime(); assertEquals(ldt, dt1); }
@Test public void test_localDate_get_set_doesnt_mutate() { DateStuff ds = new DateStuff(); LocalDate ld = new LocalDate(2007, 12, 31); ds.setALocalDate(ld); LocalDate dt1 = ds.getALocalDate(); assertEquals(ld, dt1); }
@Test public void test_dateMidnight_get_set_doesnt_mutate() { DateStuff ds = new DateStuff(); DateMidnight dm = new DateMidnight(2007, 12, 31); ds.setADateMidnight(dm); DateMidnight dm1 = ds.getADateMidnight(); assertEquals(dm, dm1); }