提交 577c2c46 编写于 作者: T terrymanu

refactor assertSelectStatement's assertProjections

上级 e29883b3
......@@ -111,10 +111,8 @@ public final class SQLStatementAssert {
}
private void assertSelectStatement(final SelectStatement actual) {
Optional<ProjectionsSegment> projectionsSegment = actual.findSQLSegment(ProjectionsSegment.class);
if (projectionsSegment.isPresent()) {
projectionAssert.assertProjections(projectionsSegment.get(), expected.getProjections());
}
ProjectionsSegment actualProjections = actual.getProjections();
projectionAssert.assertProjections(actualProjections, expected.getProjections());
Optional<GroupBySegment> groupBySegment = actual.findSQLSegment(GroupBySegment.class);
if (groupBySegment.isPresent()) {
groupByAssert.assertGroupByItems(groupBySegment.get().getGroupByItems(), expected.getGroupByColumns());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册