use of org.apache.cayenne.dbsync.merge.builders.DbEntityBuilder in project cayenne by apache.
the class DataMapMergerTest method testAddTable.
@Test
public void testAddTable() throws Exception {
DbEntityBuilder dbEntity = dbEntity("table1").attributes(dbAttr("attr01").typeInt());
DataMap existing = dataMap().with(dbEntity).build();
DataMap db = dataMap().build();
List<MergerToken> tokens = dbMerger().createMergeTokens(existing, db);
assertEquals(1, tokens.size());
assertEquals(factory().createCreateTableToDb(dbEntity.build()).getTokenValue(), tokens.get(0).getTokenValue());
}
Aggregations