test_class.declarator: dataSourceConfigurationYamlSwapper = new DataSourceConfigurationYamlSwapper()
test_class.modifier: private final
test_class.original_string: private final DataSourceConfigurationYamlSwapper dataSourceConfigurationYamlSwapper = new DataSourceConfigurationYamlSwapper();
test_class.type: DataSourceConfigurationYamlSwapper
test_class.var_name: dataSourceConfigurationYamlSwapper
test_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/test/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapperTest.java
test_class.identifier: DataSourceConfigurationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToConfiguration() {
          YamlDataSourceConfiguration yamlConfig = new YamlDataSourceConfiguration();
          yamlConfig.setDataSourceClassName("xxx.jdbc.driver");
          yamlConfig.getProps().put("url", "xx:xxx");
          yamlConfig.getProps().put("username", "root");
          DataSourceConfiguration actual = dataSourceConfigurationYamlSwapper.swapToObject(yamlConfig);
          assertThat(actual.getDataSourceClassName(), is("xxx.jdbc.driver"));
          assertThat(actual.getProps().size(), is(2));
          assertThat(actual.getProps().get("url").toString(), is("xx:xxx"));
          assertThat(actual.getProps().get("username").toString(), is("root"));
      }
test_case.class_method_signature: DataSourceConfigurationYamlSwapperTest.assertSwapToConfiguration()
test_case.full_signature: @Test public void assertSwapToConfiguration()
test_case.identifier: assertSwapToConfiguration
test_case.invocations: setDataSourceClassName put getProps put getProps swapToObject assertThat getDataSourceClassName is assertThat size getProps is assertThat toString get getProps is assertThat toString get getProps is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToConfiguration()
focal_class.file: shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-common/src/main/java/org/apache/shardingsphere/governance/core/yaml/swapper/DataSourceConfigurationYamlSwapper.java
focal_class.identifier: DataSourceConfigurationYamlSwapper
focal_class.interfaces: implements YamlSwapper<YamlDataSourceConfiguration, DataSourceConfiguration>
focal_class.class_method_signature: DataSourceConfigurationYamlSwapper.swapToYamlConfiguration(final DataSourceConfiguration config)
focal_class.full_signature: @Override public YamlDataSourceConfiguration swapToYamlConfiguration(final DataSourceConfiguration config)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final DataSourceConfiguration config)
focal_class.return: YamlDataSourceConfiguration
focal_class.signature: YamlDataSourceConfiguration swapToYamlConfiguration(final DataSourceConfiguration config)
focal_class.class_method_signature: DataSourceConfigurationYamlSwapper.swapToObject(final YamlDataSourceConfiguration yamlConfig)
focal_class.full_signature: @Override public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlDataSourceConfiguration yamlConfig)
focal_class.return: DataSourceConfiguration
focal_class.signature: DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig)
focal_method.body: @Override
      public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig) {
          DataSourceConfiguration result = new DataSourceConfiguration(yamlConfig.getDataSourceClassName());
          result.getProps().putAll(yamlConfig.getProps());
          return result;
      }
focal_method.class_method_signature: DataSourceConfigurationYamlSwapper.swapToObject(final YamlDataSourceConfiguration yamlConfig)
focal_method.full_signature: @Override public DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: getDataSourceClassName putAll getProps getProps
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlDataSourceConfiguration yamlConfig)
focal_method.return: DataSourceConfiguration
focal_method.signature: DataSourceConfiguration swapToObject(final YamlDataSourceConfiguration yamlConfig)