terrymanu commented on a change in pull request #6884:
URL: https://github.com/apache/shardingsphere/pull/6884#discussion_r471208234
##########
File path:
shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/test/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapperTest.java
##########
@@ -89,4 +102,27 @@ private void assertMasterSlaveRuleConfiguration(final
MasterSlaveRuleConfigurati
assertThat(group.getMasterDataSourceName(), is("master_ds"));
assertThat(group.getSlaveDataSourceNames(),
is(Arrays.asList("slave_ds_0", "slave_ds_1")));
}
+
+ @Test
+ public void assertGetTypeClass() {
+ MasterSlaveRuleConfigurationYamlSwapper
masterSlaveRuleConfigurationYamlSwapper =
getMasterSlaveRuleConfigurationYamlSwapper();
+ Class<MasterSlaveRuleConfiguration> actual =
masterSlaveRuleConfigurationYamlSwapper.getTypeClass();
+
assertTrue(actual.isAssignableFrom(MasterSlaveRuleConfiguration.class));
+ }
+
+ @Test
+ public void assertGetOrder() {
+ MasterSlaveRuleConfigurationYamlSwapper
masterSlaveRuleConfigurationYamlSwapper =
getMasterSlaveRuleConfigurationYamlSwapper();
+ int actual = masterSlaveRuleConfigurationYamlSwapper.getOrder();
+ assertEquals(MasterSlaveOrder.ORDER, actual);
Review comment:
Please use assertThat instead of assertEquals
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]