Add unit test for JodaTime method

This commit is contained in:
anujgaud 2023-11-18 00:59:55 +05:30 committed by GitHub
parent 293322e3a3
commit dd89145547
1 changed files with 10 additions and 0 deletions

View File

@ -25,4 +25,14 @@ public class LocalDateToISOUnitTest {
String actual = localDateToISO.formatUsingSimpleDateFormat(localDate);
assertEquals(expected, actual);
}
@Test
public void givenLocalDate_whenUsingJodaTimeThenISOFormat() {
LocalDateToISO localDateToISO = new LocalDateToISO();
org.joda.time.LocalDate localDate = new org.joda.time.LocalDate(2023, 11, 6);
String expected = "2023-11-06T00:00:00Z";
String actual = localDateToISO.formatUsingJodaTime(localDate);
assertEquals(expected, actual);
}
}