test_class.file: shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/test/java/org/apache/shardingsphere/spring/boot/util/DataSourceUtilTest.java
test_class.identifier: DataSourceUtilTest
test_case.body: @Test
      public void assertDataSourceForIntValue() throws ReflectiveOperationException {
          Map<String, Object> dataSourceProperties = new HashMap<>(7, 1);
          dataSourceProperties.put("defaultTransactionIsolation", -13);
          dataSourceProperties.put("maxTotal", 16);
          dataSourceProperties.put("maxIdle", 4);
          dataSourceProperties.put("minIdle", 16);
          dataSourceProperties.put("initialSize", 7);
          dataSourceProperties.put("maxOpenPreparedStatements", 128);
          dataSourceProperties.put("numTestsPerEvictionRun", 13);
          BasicDataSource actual = (BasicDataSource) DataSourceUtil.getDataSource(BasicDataSource.class.getName(), dataSourceProperties);
          assertThat(actual.getDefaultTransactionIsolation(), is(-13));
          assertThat(actual.getMaxTotal(), is(16));
          assertThat(actual.getMaxIdle(), is(4));
          assertThat(actual.getMinIdle(), is(16));
          assertThat(actual.getInitialSize(), is(7));
          assertThat(actual.getMaxOpenPreparedStatements(), is(128));
          assertThat(actual.getNumTestsPerEvictionRun(), is(13));
      }
test_case.class_method_signature: DataSourceUtilTest.assertDataSourceForIntValue()
test_case.full_signature: @Test public void assertDataSourceForIntValue()
test_case.identifier: assertDataSourceForIntValue
test_case.invocations: put put put put put put put getDataSource getName assertThat getDefaultTransactionIsolation is assertThat getMaxTotal is assertThat getMaxIdle is assertThat getMinIdle is assertThat getInitialSize is assertThat getMaxOpenPreparedStatements is assertThat getNumTestsPerEvictionRun is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertDataSourceForIntValue()
focal_class.declarator: SET_METHOD_PREFIX = "set"
focal_class.modifier: private static final
focal_class.original_string: private static final String SET_METHOD_PREFIX = "set";
focal_class.type: String
focal_class.var_name: SET_METHOD_PREFIX
focal_class.declarator: GENERAL_CLASS_TYPE
focal_class.modifier: private static final
focal_class.original_string: private static final Collection<Class<?>> GENERAL_CLASS_TYPE;
focal_class.type: Collection<Class<?>>
focal_class.var_name: GENERAL_CLASS_TYPE
focal_class.file: shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-boot-starter-infra/src/main/java/org/apache/shardingsphere/spring/boot/util/DataSourceUtil.java
focal_class.identifier: DataSourceUtil
focal_class.class_method_signature: DataSourceUtil.getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.full_signature: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.identifier: getDataSource
focal_class.modifiers: public static
focal_class.parameters: (final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.return: DataSource
focal_class.signature: DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_class.class_method_signature: DataSourceUtil.getSetterMethodName(final String propertyName)
focal_class.full_signature: private static String getSetterMethodName(final String propertyName)
focal_class.identifier: getSetterMethodName
focal_class.modifiers: private static
focal_class.parameters: (final String propertyName)
focal_class.return: String
focal_class.signature: String getSetterMethodName(final String propertyName)
focal_class.class_method_signature: DataSourceUtil.callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_class.full_signature: private static void callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_class.identifier: callSetterMethod
focal_class.modifiers: private static
focal_class.parameters: (final DataSource dataSource, final String methodName, final String setterValue)
focal_class.return: void
focal_class.signature: void callSetterMethod(final DataSource dataSource, final String methodName, final String setterValue)
focal_method.body: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties) throws ReflectiveOperationException {
          DataSource result = (DataSource) Class.forName(dataSourceClassName).newInstance();
          for (Entry<String, Object> entry : dataSourceProperties.entrySet()) {
              callSetterMethod(result, getSetterMethodName(entry.getKey()), null == entry.getValue() ? null : entry.getValue().toString());
          }
          return result;
      }
focal_method.class_method_signature: DataSourceUtil.getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.full_signature: public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.identifier: getDataSource
focal_method.invocations: newInstance forName entrySet callSetterMethod getSetterMethodName getKey getValue toString getValue
focal_method.modifiers: public static
focal_method.parameters: (final String dataSourceClassName, final Map<String, Object> dataSourceProperties)
focal_method.return: DataSource
focal_method.signature: DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties)