mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor ScalarType methods from getters to accessors
This commit is contained in:
@@ -16,13 +16,13 @@ public class DefaultTypeFactoryTest {
|
||||
public void testCreateBoolean() throws Exception {
|
||||
|
||||
ScalarType<Boolean> stIntBoolean = defaultTypeFactory.createBoolean("0", "1");
|
||||
assertEquals(Types.INTEGER, stIntBoolean.getJdbcType());
|
||||
assertEquals(Types.INTEGER, stIntBoolean.jdbcType());
|
||||
|
||||
stIntBoolean = defaultTypeFactory.createBoolean("1", "2");
|
||||
assertEquals(Types.INTEGER, stIntBoolean.getJdbcType());
|
||||
assertEquals(Types.INTEGER, stIntBoolean.jdbcType());
|
||||
|
||||
ScalarType<Boolean> stStringBoolean = defaultTypeFactory.createBoolean("Y", "N");
|
||||
assertEquals(Types.VARCHAR, stStringBoolean.getJdbcType());
|
||||
assertEquals(Types.VARCHAR, stStringBoolean.jdbcType());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class ScalarTypeJodaPeriodTest {
|
||||
|
||||
@Test
|
||||
public void getLength() {
|
||||
assertThat(scalarType.getLength()).isEqualTo(50);
|
||||
assertThat(scalarType.length()).isEqualTo(50);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ScalarTypeOffsetTimeTest {
|
||||
@Test
|
||||
public void testGetLength() throws Exception {
|
||||
|
||||
assertEquals(25, type.getLength());
|
||||
assertEquals(25, type.length());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ScalarTypePeriodTest {
|
||||
|
||||
@Test
|
||||
public void getLength() {
|
||||
assertThat(scalarType.getLength()).isEqualTo(20);
|
||||
assertThat(scalarType.length()).isEqualTo(20);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class ScalarTypePostgresHstoreTest {
|
||||
|
||||
@Test
|
||||
public void testIsMutable() {
|
||||
assertTrue(hstore.isMutable());
|
||||
assertTrue(hstore.mutable());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -10,6 +10,6 @@ class ScalarTypeTimeZoneTest {
|
||||
|
||||
@Test
|
||||
void getLength() {
|
||||
assertEquals(32, type.getLength());
|
||||
assertEquals(32, type.length());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class ScalarTypeZoneIdTest {
|
||||
@Test
|
||||
public void testGetLength() throws Exception {
|
||||
|
||||
assertEquals(60, type.getLength());
|
||||
assertEquals(60, type.length());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ScalarTypeZoneOffsetTest {
|
||||
@Test
|
||||
public void testGetLength() throws Exception {
|
||||
|
||||
assertEquals(60, type.getLength());
|
||||
assertEquals(60, type.length());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -100,9 +100,9 @@ class TestTypeManager extends BaseTest {
|
||||
DefaultTypeManager typeManager = createTypeManager();
|
||||
|
||||
ScalarType<?> scalarType = typeManager.getScalarType(Money.class);
|
||||
assertEquals(Types.DECIMAL, scalarType.getJdbcType());
|
||||
assertFalse(scalarType.isJdbcNative());
|
||||
assertEquals(Money.class, scalarType.getType());
|
||||
assertEquals(Types.DECIMAL, scalarType.jdbcType());
|
||||
assertFalse(scalarType.jdbcNative());
|
||||
assertEquals(Money.class, scalarType.type());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user