test_class.declarator: shardingDatabaseBroadcastRoutingEngine = new ShardingDatabaseBroadcastRoutingEngine()
test_class.modifier: private final
test_class.original_string: private final ShardingDatabaseBroadcastRoutingEngine shardingDatabaseBroadcastRoutingEngine = new ShardingDatabaseBroadcastRoutingEngine();
test_class.type: ShardingDatabaseBroadcastRoutingEngine
test_class.var_name: shardingDatabaseBroadcastRoutingEngine
test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingDatabaseBroadcastRoutingEngineTest.java
test_class.identifier: ShardingDatabaseBroadcastRoutingEngineTest
test_case.body: @Test
      public void assertRoute() {
          ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
          shardingRuleConfig.getTables().add(new ShardingTableRuleConfiguration("t_order", "ds${0..1}.t_order_${0..2}"));
          RouteContext routeContext = new RouteContext();
          shardingDatabaseBroadcastRoutingEngine.route(routeContext, new ShardingRule(shardingRuleConfig, Arrays.asList("ds0", "ds1")));
          List<RouteUnit> routeUnits = new ArrayList<>(routeContext.getRouteUnits());
          assertThat(routeContext.getRouteUnits().size(), is(2));
          assertThat(routeUnits.get(0).getDataSourceMapper().getActualName(), is("ds0"));
          assertThat(routeUnits.get(1).getDataSourceMapper().getActualName(), is("ds1"));
      }
test_case.class_method_signature: ShardingDatabaseBroadcastRoutingEngineTest.assertRoute()
test_case.full_signature: @Test public void assertRoute()
test_case.identifier: assertRoute
test_case.invocations: add getTables route asList getRouteUnits assertThat size getRouteUnits is assertThat getActualName getDataSourceMapper get is assertThat getActualName getDataSourceMapper get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertRoute()
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/broadcast/ShardingDatabaseBroadcastRoutingEngine.java
focal_class.identifier: ShardingDatabaseBroadcastRoutingEngine
focal_class.interfaces: implements ShardingRouteEngine
focal_class.class_method_signature: ShardingDatabaseBroadcastRoutingEngine.route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.full_signature: @Override public void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.identifier: route
focal_class.modifiers: @Override public
focal_class.parameters: (final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.return: void
focal_class.signature: void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.body: @Override
      public void route(final RouteContext routeContext, final ShardingRule shardingRule) {
          for (String each : shardingRule.getDataSourceNames()) {
              routeContext.getRouteUnits().add(new RouteUnit(new RouteMapper(each, each), Collections.emptyList()));
          }
      }
focal_method.class_method_signature: ShardingDatabaseBroadcastRoutingEngine.route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.full_signature: @Override public void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.identifier: route
focal_method.invocations: getDataSourceNames add getRouteUnits emptyList
focal_method.modifiers: @Override public
focal_method.parameters: (final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.return: void
focal_method.signature: void route(final RouteContext routeContext, final ShardingRule shardingRule)