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 assertSwapToYaml() {
          DataSourceConfiguration dataSourceConfig = new DataSourceConfiguration("xxx.jdbc.driver");
          dataSourceConfig.getProps().put("url", "xx:xxx");
          dataSourceConfig.getProps().put("username", "root");
          YamlDataSourceConfiguration actual = dataSourceConfigurationYamlSwapper.swapToYamlConfiguration(dataSourceConfig);
          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.assertSwapToYaml()
test_case.full_signature: @Test public void assertSwapToYaml()
test_case.identifier: assertSwapToYaml
test_case.invocations: put getProps put getProps swapToYamlConfiguration 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 assertSwapToYaml()
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 YamlDataSourceConfiguration swapToYamlConfiguration(final DataSourceConfiguration config) {
          YamlDataSourceConfiguration result = new YamlDataSourceConfiguration();
          result.setDataSourceClassName(config.getDataSourceClassName());
          result.setProps(config.getProps());
          return result;
      }
focal_method.class_method_signature: DataSourceConfigurationYamlSwapper.swapToYamlConfiguration(final DataSourceConfiguration config)
focal_method.full_signature: @Override public YamlDataSourceConfiguration swapToYamlConfiguration(final DataSourceConfiguration config)
focal_method.identifier: swapToYamlConfiguration
focal_method.invocations: setDataSourceClassName getDataSourceClassName setProps getProps
focal_method.modifiers: @Override public
focal_method.parameters: (final DataSourceConfiguration config)
focal_method.return: YamlDataSourceConfiguration
focal_method.signature: YamlDataSourceConfiguration swapToYamlConfiguration(final DataSourceConfiguration config)