FIX: Backward compatibility to ebean 11

This commit is contained in:
Roland Praml committed 2021-11-29 13:30:56 +01:00
1 parent 3883db84b5
commit 4152ae9814
2 files changed
+17 -1

No files matched your search

@@ -123,4 +123,15 @@ public class ScalarTypeLocalDateTimeTest {
LocalDateTime value = typeIso.fromJsonISO8601(asJson);
assertThat(localDateTime).isEqualToIgnoringNanos(value);
}
@Test
public void testParseEbean11() {
ScalarTypeLocalDateTime typeDefault = new ScalarTypeLocalDateTime(JsonConfig.DateTime.ISO8601);
LocalDateTime fromMillis = typeDefault.parse("1517627106000");
LocalDateTime fromIso= typeDefault.parse("2018-02-03T04:05:06");
assertThat(fromMillis).isEqualToIgnoringNanos(fromIso);
}
}