Update JodaDateTimeToDateAndViceVersaUnitTest.java (#15587)

assertEquals(jodaDateTime.getMillis(), javaDate.getTime());
assertEquals(javaDate.getTime(), jodaDateTime.getMillis());
This commit is contained in:
DiegoMarti2 2024-01-11 19:28:24 +02:00 committed by GitHub
parent f3f51df137
commit 9e5f305c32
1 changed files with 2 additions and 2 deletions

View File

@ -10,13 +10,13 @@ public class JodaDateTimeToDateAndViceVersaUnitTest {
public void givenJodaDateTime_whenConvertingToJavaDate_thenConversionIsCorrect() {
DateTime jodaDateTime = new DateTime();
java.util.Date javaDate = jodaDateTime.toDate();
assertEquals(jodaDateTime, new DateTime(javaDate));
assertEquals(jodaDateTime.getMillis(), javaDate.getTime());
}
@Test
public void givenJavaDate_whenConvertingToJodaDateTime_thenConversionIsCorrect() {
java.util.Date javaDate = new java.util.Date();
DateTime jodaDateTime = new DateTime(javaDate);
assertEquals(javaDate, jodaDateTime.toDate());
assertEquals(javaDate.getTime(), jodaDateTime.getMillis());
}
}