use of io.shardingjdbc.core.parsing.integrate.jaxb.condition.ExpectedCondition in project sharding-jdbc by shardingjdbc.
the class ConditionAssert method assertConditions.
/**
* Assert conditions.
*
* @param actual actual conditions
* @param expected expected conditions
*/
public void assertConditions(final Conditions actual, final List<ExpectedCondition> expected) {
assertThat(assertMessage.getFullAssertMessage("Conditions size assertion error: "), actual.getConditions().size(), is(expected.size()));
for (ExpectedCondition each : expected) {
Optional<Condition> condition = actual.find(new Column(each.getColumnName(), each.getTableName()));
assertTrue(assertMessage.getFullAssertMessage("Table should exist: "), condition.isPresent());
assertCondition(condition.get(), each);
}
}
Aggregations