@Test public void testInsertProject() { long count = 0; String name = "projectName"; String url = "my/url"; executeSuccess(queries.projectInsertStatement(name, url)); assertEquals(++count, getProjectsCount()); executeSuccess(queries.projectInsertStatement("anotherProject", null)); assertEquals(++count, getProjectsCount()); executeSuccess(queries.projectInsertStatement("thirdProject", url)); assertEquals(++count, getProjectsCount()); executeNothinhDone(queries.projectInsertStatement(name, url)); executeNothinhDone(queries.projectInsertStatement(name, null)); assertEquals(count, getProjectsCount()); }
@Override public String projectInsertStatement(String projectName, String url) { return "INSERT INTO Project (name, url) " + "VALUES ('" + projectName + "', '" + url + "') ON CONFLICT DO NOTHING;"; }
JDBCProjectQueries implements ProjectQueries { @Override public String projectInsertStatement(String projectName, String url) { return "INSERT INTO Project (name, url) " + "VALUES ('" + projectName + "', '" + url + "') ON CONFLICT DO NOTHING;"; } }
JDBCProjectQueries implements ProjectQueries { @Override public String projectInsertStatement(String projectName, String url) { return "INSERT INTO Project (name, url) " + "VALUES ('" + projectName + "', '" + url + "') ON CONFLICT DO NOTHING;"; }  }
JDBCProjectQueries implements ProjectQueries { @Override public String projectInsertStatement(String projectName, String url) { return "INSERT INTO Project (name, url) " + "VALUES ('" + projectName + "', '" + url + "') ON CONFLICT DO NOTHING;"; }  @Override String projectInsertStatement(String projectName, String url); @Override String idFromNameQuery(String name); }
JDBCProjectQueries implements ProjectQueries { @Override public String projectInsertStatement(String projectName, String url) { return "INSERT INTO Project (name, url) " + "VALUES ('" + projectName + "', '" + url + "') ON CONFLICT DO NOTHING;"; }  @Override String projectInsertStatement(String projectName, String url); @Override String idFromNameQuery(String name);  }