test_class.declarator: tableRuleConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ShardingTableRuleConfigurationYamlSwapper tableRuleConfigurationYamlSwapper;
test_class.type: ShardingTableRuleConfigurationYamlSwapper
test_class.var_name: tableRuleConfigurationYamlSwapper
test_class.declarator: shardingStrategyConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ShardingStrategyConfigurationYamlSwapper shardingStrategyConfigurationYamlSwapper;
test_class.type: ShardingStrategyConfigurationYamlSwapper
test_class.var_name: shardingStrategyConfigurationYamlSwapper
test_class.declarator: keyGenerateStrategyConfigurationYamlSwapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private KeyGenerateStrategyConfigurationYamlSwapper keyGenerateStrategyConfigurationYamlSwapper;
test_class.type: KeyGenerateStrategyConfigurationYamlSwapper
test_class.var_name: keyGenerateStrategyConfigurationYamlSwapper
test_class.declarator: shardingRuleConfigurationYamlSwapper = new ShardingRuleConfigurationYamlSwapper()
test_class.modifier: private final
test_class.original_string: private final ShardingRuleConfigurationYamlSwapper shardingRuleConfigurationYamlSwapper = new ShardingRuleConfigurationYamlSwapper();
test_class.type: ShardingRuleConfigurationYamlSwapper
test_class.var_name: shardingRuleConfigurationYamlSwapper
test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapperTest.java
test_class.identifier: ShardingRuleConfigurationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToYamlWithMaxProperties() {
          ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
          shardingRuleConfig.getTables().add(mock(ShardingTableRuleConfiguration.class));
          shardingRuleConfig.getBindingTableGroups().add("tbl, sub_tbl");
          shardingRuleConfig.getBroadcastTables().add("dict");
          shardingRuleConfig.setDefaultDatabaseShardingStrategy(mock(ShardingStrategyConfiguration.class));
          shardingRuleConfig.setDefaultTableShardingStrategy(mock(ShardingStrategyConfiguration.class));
          shardingRuleConfig.setDefaultKeyGenerateStrategy(mock(KeyGenerateStrategyConfiguration.class));
          YamlShardingRuleConfiguration actual = shardingRuleConfigurationYamlSwapper.swapToYamlConfiguration(shardingRuleConfig);
          assertThat(actual.getTables().size(), is(1));
          assertThat(actual.getBindingTables().size(), is(1));
          assertThat(actual.getBindingTables().iterator().next(), is("tbl, sub_tbl"));
          assertThat(actual.getBroadcastTables().size(), is(1));
          assertThat(actual.getBroadcastTables().iterator().next(), is("dict"));
          assertNotNull(actual.getDefaultDatabaseStrategy());
          assertNotNull(actual.getDefaultTableStrategy());
          assertNotNull(actual.getDefaultKeyGenerateStrategy());
      }
test_case.class_method_signature: ShardingRuleConfigurationYamlSwapperTest.assertSwapToYamlWithMaxProperties()
test_case.full_signature: @Test public void assertSwapToYamlWithMaxProperties()
test_case.identifier: assertSwapToYamlWithMaxProperties
test_case.invocations: add getTables mock add getBindingTableGroups add getBroadcastTables setDefaultDatabaseShardingStrategy mock setDefaultTableShardingStrategy mock setDefaultKeyGenerateStrategy mock swapToYamlConfiguration assertThat size getTables is assertThat size getBindingTables is assertThat next iterator getBindingTables is assertThat size getBroadcastTables is assertThat next iterator getBroadcastTables is assertNotNull getDefaultDatabaseStrategy assertNotNull getDefaultTableStrategy assertNotNull getDefaultKeyGenerateStrategy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToYamlWithMaxProperties()
focal_class.declarator: tableYamlSwapper = new ShardingTableRuleConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingTableRuleConfigurationYamlSwapper tableYamlSwapper = new ShardingTableRuleConfigurationYamlSwapper();
focal_class.type: ShardingTableRuleConfigurationYamlSwapper
focal_class.var_name: tableYamlSwapper
focal_class.declarator: autoTableYamlSwapper = new ShardingAutoTableRuleConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingAutoTableRuleConfigurationYamlSwapper autoTableYamlSwapper = new ShardingAutoTableRuleConfigurationYamlSwapper();
focal_class.type: ShardingAutoTableRuleConfigurationYamlSwapper
focal_class.var_name: autoTableYamlSwapper
focal_class.declarator: shardingStrategyYamlSwapper = new ShardingStrategyConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingStrategyConfigurationYamlSwapper shardingStrategyYamlSwapper = new ShardingStrategyConfigurationYamlSwapper();
focal_class.type: ShardingStrategyConfigurationYamlSwapper
focal_class.var_name: shardingStrategyYamlSwapper
focal_class.declarator: keyGenerateStrategyYamlSwapper = new KeyGenerateStrategyConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final KeyGenerateStrategyConfigurationYamlSwapper keyGenerateStrategyYamlSwapper = new KeyGenerateStrategyConfigurationYamlSwapper();
focal_class.type: KeyGenerateStrategyConfigurationYamlSwapper
focal_class.var_name: keyGenerateStrategyYamlSwapper
focal_class.declarator: algorithmSwapper = new ShardingSphereAlgorithmConfigurationYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ShardingSphereAlgorithmConfigurationYamlSwapper algorithmSwapper = new ShardingSphereAlgorithmConfigurationYamlSwapper();
focal_class.type: ShardingSphereAlgorithmConfigurationYamlSwapper
focal_class.var_name: algorithmSwapper
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationYamlSwapper.java
focal_class.identifier: ShardingRuleConfigurationYamlSwapper
focal_class.interfaces: implements YamlRuleConfigurationSwapper<YamlShardingRuleConfiguration, ShardingRuleConfiguration>
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.full_signature: @Override public YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final ShardingRuleConfiguration data)
focal_class.return: YamlShardingRuleConfiguration
focal_class.signature: YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: private void setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: setYamlDefaultStrategies
focal_class.modifiers: private
focal_class.parameters: (final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: void
focal_class.signature: void setYamlDefaultStrategies(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: private void setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: setYamlAlgorithms
focal_class.modifiers: private
focal_class.parameters: (final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: void
focal_class.signature: void setYamlAlgorithms(final ShardingRuleConfiguration data, final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.full_signature: @Override public ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig)
focal_class.return: ShardingRuleConfiguration
focal_class.signature: ShardingRuleConfiguration swapToObject(final YamlShardingRuleConfiguration yamlConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.full_signature: private void setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.identifier: setDefaultStrategies
focal_class.modifiers: private
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.return: void
focal_class.signature: void setDefaultStrategies(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.full_signature: private void setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.identifier: setAlgorithms
focal_class.modifiers: private
focal_class.parameters: (final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.return: void
focal_class.signature: void setAlgorithms(final YamlShardingRuleConfiguration yamlConfig, final ShardingRuleConfiguration ruleConfig)
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getTypeClass()
focal_class.full_signature: @Override public Class<ShardingRuleConfiguration> getTypeClass()
focal_class.identifier: getTypeClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<ShardingRuleConfiguration>
focal_class.signature: Class<ShardingRuleConfiguration> getTypeClass()
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getRuleTagName()
focal_class.full_signature: @Override public String getRuleTagName()
focal_class.identifier: getRuleTagName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRuleTagName()
focal_class.class_method_signature: ShardingRuleConfigurationYamlSwapper.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_method.body: @Override
      public YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data) {
          YamlShardingRuleConfiguration result = new YamlShardingRuleConfiguration();
          data.getTables().forEach(each -> result.getTables().put(each.getLogicTable(), tableYamlSwapper.swapToYamlConfiguration(each)));
          data.getAutoTables().forEach(each -> result.getAutoTables().put(each.getLogicTable(), autoTableYamlSwapper.swapToYamlConfiguration(each)));
          result.getBindingTables().addAll(data.getBindingTableGroups());
          result.getBroadcastTables().addAll(data.getBroadcastTables());
          setYamlDefaultStrategies(data, result);
          setYamlAlgorithms(data, result);
          return result;
      }
focal_method.class_method_signature: ShardingRuleConfigurationYamlSwapper.swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_method.full_signature: @Override public YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)
focal_method.identifier: swapToYamlConfiguration
focal_method.invocations: forEach getTables put getTables getLogicTable swapToYamlConfiguration forEach getAutoTables put getAutoTables getLogicTable swapToYamlConfiguration addAll getBindingTables getBindingTableGroups addAll getBroadcastTables getBroadcastTables setYamlDefaultStrategies setYamlAlgorithms
focal_method.modifiers: @Override public
focal_method.parameters: (final ShardingRuleConfiguration data)
focal_method.return: YamlShardingRuleConfiguration
focal_method.signature: YamlShardingRuleConfiguration swapToYamlConfiguration(final ShardingRuleConfiguration data)