Tests can extend to provide a decorator that defines some schema items and then have CleanDatabaseTestSetup automatically clean them up by implementing the decorateSQL method.. As an example: return new CleanDatabaseTestSetup(suite) { protected void decorateSQL(Statement s) throws SQLException { s.execute("CREATE TABLE T (I INT)"); s.execute("CREATE INDEX TI ON T(I)") } };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|