View Javadoc

1   package liquibase.sqlgenerator.core;
2   
3   public abstract class DropForeignKeyConstraintGeneratorTest {
4   //    @Test
5   //    public void execute_defaultSchema() throws Exception {
6   //        new DatabaseTestTemplate().testOnAvailableDatabases(
7   //                new SqlStatementDatabaseTest(null, new DropForeignKeyConstraintStatement(null, TABLE_NAME, CONSTRAINT_NAME)) {
8   //
9   //                    protected void preExecuteAssert(DatabaseSnapshotGenerator snapshot) {
10  //                        assertNotNull(snapshot.getForeignKey(CONSTRAINT_NAME));
11  //                    }
12  //
13  //                    protected void postExecuteAssert(DatabaseSnapshotGenerator snapshot) {
14  //                        assertNull(snapshot.getForeignKey(CONSTRAINT_NAME));
15  //                    }
16  //
17  //                });
18  //    }
19  //
20  //    @Test
21  //    public void execute_altSchema() throws Exception {
22  //        new DatabaseTestTemplate().testOnAvailableDatabases (
23  //
24  //                new SqlStatementDatabaseTest(TestContext.ALT_SCHEMA, new DropForeignKeyConstraintStatement(TestContext.ALT_SCHEMA, TABLE_NAME, ALT_SCHEMA_NAME)) {
25  //
26  //                    protected boolean expectedException(Database database, DatabaseException exception) {
27  //                        return !database.supportsSchemas();
28  //                    }
29  //
30  //                    protected void preExecuteAssert(DatabaseSnapshotGenerator snapshot) {
31  //                        //fk constraint is not stored in the alt schema, how can we best test it?
32  ////                        assertNotNull(snapshot.getForeignKey(ALT_SCHEMA_NAME));
33  //                    }
34  //
35  //                    protected void postExecuteAssert(DatabaseSnapshotGenerator snapshot) {
36  //                        //fk constraint is not stored in the alt schema, how can we best test it?
37  ////                        assertNull(snapshot.getForeignKey(ALT_SCHEMA_NAME));
38  //                    }
39  //
40  //                });
41  //    }
42  
43  }