@Test public void validate_nullGenerators() { SqlGeneratorChain chain = new SqlGeneratorChain(null); ValidationErrors validationErrors = chain.validate(new MockSqlStatement(), new MockDatabase()); assertFalse(validationErrors.hasErrors()); }
public ValidationErrors validate(SqlStatement statement, Database database) { if (sqlGenerators == null || !sqlGenerators.hasNext()) { return new ValidationErrors(); } return sqlGenerators.next().validate(statement, database, this); }
SqlGeneratorChain { public ValidationErrors validate(SqlStatement statement, Database database) { if (sqlGenerators == null || !sqlGenerators.hasNext()) { return new ValidationErrors(); } return sqlGenerators.next().validate(statement, database, this); } }
SqlGeneratorChain { public ValidationErrors validate(SqlStatement statement, Database database) { if (sqlGenerators == null || !sqlGenerators.hasNext()) { return new ValidationErrors(); } return sqlGenerators.next().validate(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); }
SqlGeneratorChain { public ValidationErrors validate(SqlStatement statement, Database database) { if (sqlGenerators == null || !sqlGenerators.hasNext()) { return new ValidationErrors(); } return sqlGenerators.next().validate(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); Sql[] generateSql(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database); }
SqlGeneratorChain { public ValidationErrors validate(SqlStatement statement, Database database) { if (sqlGenerators == null || !sqlGenerators.hasNext()) { return new ValidationErrors(); } return sqlGenerators.next().validate(statement, database, this); } SqlGeneratorChain(SortedSet<SqlGenerator> sqlGenerators); Sql[] generateSql(SqlStatement statement, Database database); Warnings warn(SqlStatement statement, Database database); ValidationErrors validate(SqlStatement statement, Database database);  }