Refactor ScalarType methods from getters to accessors

This commit is contained in:
Rob Bygrave
2022-08-25 12:25:38 +12:00
parent 4959053ce0
commit 26f0605d72
78 changed files with 167 additions and 167 deletions
@@ -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
@@ -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