use of com.cadenzauk.core.RandomValues.randomLocalDate in project siesta by cadenzauk.
the class DataTypeTest method toDatabaseLocalDate.
@ParameterizedTest
@MethodSource("timeZones")
void toDatabaseLocalDate(String timeZone) {
try (UncheckedAutoCloseable ignored = withTimeZone(timeZone)) {
LocalDate input = RandomValues.randomLocalDate();
Date expected = Date.valueOf(input);
when(db.dialect()).thenReturn(new AnsiDialect());
Object result = DataType.LOCAL_DATE.toDatabase(db, input);
assertThat(result, is(expected));
}
}
Aggregations