mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Remove ScalarType.isDateTimeCapable() ... (only used by CSV reader)
So the complexity cost doesn't justify itself against only being used by CSV reader to validate when assigning a date/time format to a property / expression path.
This commit is contained in:
@@ -75,11 +75,6 @@ class ScalarTypeDurationTest {
|
||||
assertEquals(Duration.ofSeconds(1234), duration);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testConvertFromMillis() {
|
||||
assertThrows(UnsupportedOperationException.class, () -> type.convertFromMillis(1000));
|
||||
|
||||
-5
@@ -75,11 +75,6 @@ class ScalarTypeDurationWithNanosTest {
|
||||
assertEquals(duration, val1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testConvertFromMillis() {
|
||||
assertThrows(UnsupportedOperationException.class, () -> type.convertFromMillis(1000));
|
||||
|
||||
@@ -11,7 +11,8 @@ import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class ScalarTypeInstantTest {
|
||||
|
||||
@@ -107,12 +108,6 @@ public class ScalarTypeInstantTest {
|
||||
assertEquals(now, val1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDateTimeCapable() throws Exception {
|
||||
|
||||
assertTrue(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertFromMillis() throws Exception {
|
||||
|
||||
|
||||
@@ -77,11 +77,6 @@ public class ScalarTypeLocalTimeTest {
|
||||
assertEquals(localTime, val1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertFromMillis() {
|
||||
assertThrows(TextException.class, () -> type.convertFromMillis(1234));
|
||||
|
||||
-5
@@ -74,11 +74,6 @@ public class ScalarTypeLocalTimeWithNanosTest {
|
||||
assertEquals(localTime, val1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertFromMillis() {
|
||||
assertThrows(TextException.class, () -> type.convertFromMillis(1234));
|
||||
|
||||
@@ -6,7 +6,8 @@ import java.sql.Date;
|
||||
import java.time.LocalDate;
|
||||
import java.time.MonthDay;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class ScalarTypeMonthDayTest {
|
||||
|
||||
@@ -48,11 +49,6 @@ public class ScalarTypeMonthDayTest {
|
||||
assertEquals(value, monthDay);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConvertFromMillis() {
|
||||
assertThrows(RuntimeException.class, () -> type.convertFromMillis(1203));
|
||||
|
||||
-5
@@ -26,11 +26,6 @@ public class ScalarTypePostgresHstoreTest {
|
||||
assertTrue(hstore.isMutable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDateTimeCapable() {
|
||||
assertFalse(hstore.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsDirty() {
|
||||
Map<String, Object> emptyMap = new HashMap<>();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.ebeaninternal.server.type;
|
||||
|
||||
import io.ebean.text.TextException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
@@ -71,11 +70,6 @@ class ScalarTypeYearTest {
|
||||
assertEquals(Year.of(2013), year);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsDateTimeCapable() {
|
||||
assertFalse(type.isDateTimeCapable());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testConvertFromMillis() {
|
||||
assertThrows(UnsupportedOperationException.class, () -> type.convertFromMillis(1000));
|
||||
|
||||
Reference in New Issue
Block a user