@Test public void testSetUpAll() throws ClassNotFoundException, SQLException { DB2Database db2Database = new DB2Database(); final SQLInputs sqlInputs = SQLInputs.builder().build(); sqlInputs.setDbName(DB_NAME); sqlInputs.setDbServer(DB_SERVER); sqlInputs.setDbPort(DB_PORT); final List<String> dbUrls = db2Database.setUp(sqlInputs); assertEquals("jdbc:db2: assertEquals(1, dbUrls.size()); }
@Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.ibm.db2.jcc.DB2Driver"); final String host = SQLUtils.getIPv4OrIPv6WithSquareBracketsHost(sqlInputs.getDbServer()); final StringBuilder connectionSb = new StringBuilder("jdbc:db2: .append(host) .append(COLON) .append(sqlInputs.getDbPort()); if (StringUtils.isNoneEmpty(sqlInputs.getDbName())) { connectionSb.append(FORWARD_SLASH) .append(sqlInputs.getDbName()); } final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionSb.toString()); return dbUrls; }
DB2Database implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.ibm.db2.jcc.DB2Driver"); final String host = SQLUtils.getIPv4OrIPv6WithSquareBracketsHost(sqlInputs.getDbServer()); final StringBuilder connectionSb = new StringBuilder("jdbc:db2: .append(host) .append(COLON) .append(sqlInputs.getDbPort()); if (StringUtils.isNoneEmpty(sqlInputs.getDbName())) { connectionSb.append(FORWARD_SLASH) .append(sqlInputs.getDbName()); } final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionSb.toString()); return dbUrls; } }
DB2Database implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.ibm.db2.jcc.DB2Driver"); final String host = SQLUtils.getIPv4OrIPv6WithSquareBracketsHost(sqlInputs.getDbServer()); final StringBuilder connectionSb = new StringBuilder("jdbc:db2: .append(host) .append(COLON) .append(sqlInputs.getDbPort()); if (StringUtils.isNoneEmpty(sqlInputs.getDbName())) { connectionSb.append(FORWARD_SLASH) .append(sqlInputs.getDbName()); } final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionSb.toString()); return dbUrls; }  }
DB2Database implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.ibm.db2.jcc.DB2Driver"); final String host = SQLUtils.getIPv4OrIPv6WithSquareBracketsHost(sqlInputs.getDbServer()); final StringBuilder connectionSb = new StringBuilder("jdbc:db2: .append(host) .append(COLON) .append(sqlInputs.getDbPort()); if (StringUtils.isNoneEmpty(sqlInputs.getDbName())) { connectionSb.append(FORWARD_SLASH) .append(sqlInputs.getDbName()); } final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionSb.toString()); return dbUrls; }  @Override List<String> setUp(@NotNull final SQLInputs sqlInputs); }
DB2Database implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.ibm.db2.jcc.DB2Driver"); final String host = SQLUtils.getIPv4OrIPv6WithSquareBracketsHost(sqlInputs.getDbServer()); final StringBuilder connectionSb = new StringBuilder("jdbc:db2: .append(host) .append(COLON) .append(sqlInputs.getDbPort()); if (StringUtils.isNoneEmpty(sqlInputs.getDbName())) { connectionSb.append(FORWARD_SLASH) .append(sqlInputs.getDbName()); } final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionSb.toString()); return dbUrls; }  @Override List<String> setUp(@NotNull final SQLInputs sqlInputs);  }