use of io.shardingjdbc.core.parsing.integrate.jaxb.table.ExpectedTable in project sharding-jdbc by shardingjdbc.
the class TableAssert method assertTables.
/**
* Assert tables.
*
* @param actual actual tables
* @param expected expected tables
*/
public void assertTables(final Tables actual, final List<ExpectedTable> expected) {
assertThat(assertMessage.getFullAssertMessage("Tables size assertion error: "), actual.getTableNames().size(), is(expected.size()));
for (ExpectedTable each : expected) {
Optional<Table> table;
if (null != each.getAlias()) {
table = actual.find(each.getAlias());
} else {
table = actual.find(each.getName());
}
assertTrue(assertMessage.getFullAssertMessage("Table should exist: "), table.isPresent());
assertTable(table.get(), each);
}
}
Aggregations