use of org.mockito.internal.matchers.apachecommons.ReflectionEquals in project sharding-jdbc by dangdangdotcom.
the class AbstractBaseParseTest method assertMergeContext.
private void assertMergeContext(final SQLParsedResult actual) {
for (OrderByColumn each : actual.getMergeContext().getOrderByColumns()) {
assertThat(each, new ReflectionEquals(orderByColumns.next()));
}
assertFalse(orderByColumns.hasNext());
for (GroupByColumn each : actual.getMergeContext().getGroupByColumns()) {
assertThat(each, new ReflectionEquals(groupByColumns.next()));
}
assertFalse(groupByColumns.hasNext());
for (AggregationColumn each : actual.getMergeContext().getAggregationColumns()) {
AggregationColumn expected = aggregationColumns.next();
assertThat(each, new ReflectionEquals(expected, "derivedColumns"));
for (int i = 0; i < each.getDerivedColumns().size(); i++) {
assertThat(each.getDerivedColumns().get(i), new ReflectionEquals(expected.getDerivedColumns().get(i)));
}
}
assertFalse(aggregationColumns.hasNext());
assertThat(actual.getMergeContext().getLimit(), new ReflectionEquals(limit));
}
use of org.mockito.internal.matchers.apachecommons.ReflectionEquals in project sharding-jdbc by dangdangdotcom.
the class AbstractBaseParseTest method assertRouteContext.
private void assertRouteContext(final SQLParsedResult actual) {
assertThat(actual.getRouteContext().getSqlBuilder().toString(), is(expectedSQL));
for (Table each : actual.getRouteContext().getTables()) {
assertThat(each, new ReflectionEquals(expectedTables.next()));
}
assertFalse(expectedTables.hasNext());
}
Aggregations