mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1695 Add caseSensitiveCollation configuration option
This is really only to use with testing via platform.isCaseSensitiveCollation() to determine which asserts/tests apply (based on collation).
This commit is contained in:
@@ -127,7 +127,7 @@ public abstract class BaseTestCase {
|
||||
}
|
||||
|
||||
public boolean isPlatformCaseSensitive() {
|
||||
return !isMySql() && !isSqlServer();
|
||||
return spiEbeanServer().getDatabasePlatform().isCaseSensitiveCollation();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,6 +70,7 @@ public class ServerConfigTest {
|
||||
props.setProperty("namingConvention", "io.ebean.config.MatchingNamingConvention");
|
||||
props.setProperty("idGeneratorAutomatic", "true");
|
||||
props.setProperty("enabledL2Regions", "r0,users,orgs");
|
||||
props.setProperty("caseSensitiveCollation", "false");
|
||||
|
||||
|
||||
serverConfig.loadFromProperties(props);
|
||||
@@ -79,6 +80,7 @@ public class ServerConfigTest {
|
||||
assertTrue(serverConfig.isDbOffline());
|
||||
assertTrue(serverConfig.isAutoReadOnlyDataSource());
|
||||
assertTrue(serverConfig.isIdGeneratorAutomatic());
|
||||
assertFalse(serverConfig.getPlatformConfig().isCaseSensitiveCollation());
|
||||
|
||||
assertThat(serverConfig.getNamingConvention()).isInstanceOf(MatchingNamingConvention.class);
|
||||
|
||||
@@ -131,6 +133,7 @@ public class ServerConfigTest {
|
||||
assertFalse(serverConfig.isIdGeneratorAutomatic());
|
||||
assertEquals(JsonConfig.DateTime.ISO8601, serverConfig.getJsonDateTime());
|
||||
assertEquals(JsonConfig.Date.ISO8601, serverConfig.getJsonDate());
|
||||
assertTrue(serverConfig.getPlatformConfig().isCaseSensitiveCollation());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user