@Test public void testSetUpNoServerName() throws ClassNotFoundException, SQLException { expectedEx.expect(IllegalArgumentException.class); expectedEx.expectMessage("host not valid"); MySqlDatabase mySqlDatabase = new MySqlDatabase(); final SQLInputs sqlInputs = SQLInputs.builder().build(); sqlInputs.setDbName(DB_NAME); sqlInputs.setDbServer(null); sqlInputs.setDbPort(DB_PORT); mySqlDatabase.setUp(sqlInputs); }
@Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.mysql.jdbc.Driver"); final String connectionString = getConnectionString(sqlInputs); final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionString); return dbUrls; }
MySqlDatabase implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.mysql.jdbc.Driver"); final String connectionString = getConnectionString(sqlInputs); final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionString); return dbUrls; } }
MySqlDatabase implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.mysql.jdbc.Driver"); final String connectionString = getConnectionString(sqlInputs); final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionString); return dbUrls; }  }
MySqlDatabase implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.mysql.jdbc.Driver"); final String connectionString = getConnectionString(sqlInputs); final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionString); return dbUrls; }  @Override List<String> setUp(@NotNull final SQLInputs sqlInputs); }
MySqlDatabase implements SqlDatabase { @Override public List<String> setUp(@NotNull final SQLInputs sqlInputs) { loadClassForName("com.mysql.jdbc.Driver"); final String connectionString = getConnectionString(sqlInputs); final List<String> dbUrls = getDbUrls(sqlInputs.getDbUrl()); dbUrls.add(connectionString); return dbUrls; }  @Override List<String> setUp(@NotNull final SQLInputs sqlInputs);  }