terrymanu commented on code in PR #18895:
URL: https://github.com/apache/shardingsphere/pull/18895#discussion_r914975315
##########
shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/ShardingSphereDatabasesFactoryTest.java:
##########
@@ -50,4 +51,13 @@ public void assertCreate() throws SQLException {
assertThat(rules.iterator().next(),
instanceOf(FixtureDatabaseRule.class));
assertTrue(actual.get("foo_db").getResource().getDataSources().isEmpty());
}
+
+ @Test
+ public void assertCreateSingleDatabase() throws SQLException {
+ DatabaseConfiguration databaseConfig = new
DataSourceProvidedDatabaseConfiguration(Collections.emptyMap(),
Collections.singleton(new FixtureRuleConfiguration()));
+ ShardingSphereDatabase actual =
ShardingSphereDatabasesFactory.create("foo_db", databaseConfig, new
ConfigurationProperties(new Properties()), mock(InstanceContext.class));
+ assertEquals("foo_db", actual.getName());
Review Comment:
Please use assertThat
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]