@Test public void getElse(){ InsertOrUpdateGeneratorMSSQL generator = new InsertOrUpdateGeneratorMSSQL(); MSSQLDatabase database = new MSSQLDatabase(); InsertOrUpdateStatement statement = new InsertOrUpdateStatement("myschema","mytable","pk_col1"); statement.addColumnValue("pk_col1","value1"); statement.addColumnValue("col2","value2"); String where = "1 = 1"; Class c = InsertOrUpdateGenerator.class.getClass(); String insertStatement = (String)invokePrivateMethod(generator,"getElse", new Object[] {database}); Integer lineNumber = 0; String[] lines = insertStatement.split("\n"); assertEquals("ELSE", lines[lineNumber]); }
protected String getElse(Database database) { return "ELSE\n"; }
InsertOrUpdateGeneratorMSSQL extends InsertOrUpdateGenerator { protected String getElse(Database database) { return "ELSE\n"; } }
InsertOrUpdateGeneratorMSSQL extends InsertOrUpdateGenerator { protected String getElse(Database database) { return "ELSE\n"; }  }
InsertOrUpdateGeneratorMSSQL extends InsertOrUpdateGenerator { protected String getElse(Database database) { return "ELSE\n"; }  boolean supports(InsertOrUpdateStatement statement, Database database); @Override Sql[] generateSql(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain); }
InsertOrUpdateGeneratorMSSQL extends InsertOrUpdateGenerator { protected String getElse(Database database) { return "ELSE\n"; }  boolean supports(InsertOrUpdateStatement statement, Database database); @Override Sql[] generateSql(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain);  }