Search in sources :

Example 1 with DropTableToDb

use of org.apache.cayenne.dbsync.merge.token.db.DropTableToDb in project cayenne by apache.

the class TokenSortTest method testToDbTokensCompare.

@Test
public void testToDbTokensCompare() throws Exception {
    List<MergerToken> tokens = Arrays.<MergerToken>asList(new DropColumnToDb(null, null), new DropRelationshipToDb(null, null), new DropTableToDb(null), new AddColumnToModel(null, null), new AddRelationshipToDb(null, null), new AddColumnToDb(null, null), new CreateTableToDb(null));
    Collections.sort(tokens);
    List<String> actual = toClassesNames(tokens);
    List<String> expected = Arrays.asList("DropRelationshipToDb", "DropColumnToDb", "DropTableToDb", "CreateTableToDb", "AddColumnToDb", "AddColumnToModel", "AddRelationshipToDb");
    assertEquals(expected, actual);
}
Also used : AddColumnToDb(org.apache.cayenne.dbsync.merge.token.db.AddColumnToDb) CreateTableToDb(org.apache.cayenne.dbsync.merge.token.db.CreateTableToDb) DropColumnToDb(org.apache.cayenne.dbsync.merge.token.db.DropColumnToDb) AddRelationshipToDb(org.apache.cayenne.dbsync.merge.token.db.AddRelationshipToDb) DropTableToDb(org.apache.cayenne.dbsync.merge.token.db.DropTableToDb) DropRelationshipToDb(org.apache.cayenne.dbsync.merge.token.db.DropRelationshipToDb) AddColumnToModel(org.apache.cayenne.dbsync.merge.token.model.AddColumnToModel) Test(org.junit.Test)

Aggregations

AddColumnToDb (org.apache.cayenne.dbsync.merge.token.db.AddColumnToDb)1 AddRelationshipToDb (org.apache.cayenne.dbsync.merge.token.db.AddRelationshipToDb)1 CreateTableToDb (org.apache.cayenne.dbsync.merge.token.db.CreateTableToDb)1 DropColumnToDb (org.apache.cayenne.dbsync.merge.token.db.DropColumnToDb)1 DropRelationshipToDb (org.apache.cayenne.dbsync.merge.token.db.DropRelationshipToDb)1 DropTableToDb (org.apache.cayenne.dbsync.merge.token.db.DropTableToDb)1 AddColumnToModel (org.apache.cayenne.dbsync.merge.token.model.AddColumnToModel)1 Test (org.junit.Test)1