terrymanu commented on a change in pull request #3199: improved coverage for
package of preprocessor
URL:
https://github.com/apache/incubator-shardingsphere/pull/3199#discussion_r333054960
##########
File path:
sharding-core/sharding-core-preprocessor/src/test/java/org/apache/shardingsphere/core/optimize/segment/select/projection/engine/ProjectionEngineTest.java
##########
@@ -45,4 +55,38 @@ public void
assertProjectionCreatedWhenSelectItemSegmentInstanceOfShorthandSelec
assertTrue(projection.isPresent());
assertTrue(projection.get() instanceof ShorthandProjection);
}
+
+ @Test
+ public void
assertProjectionCreatedWhenSelectItemSegmentInstanceOfColumnSelectItemSegment()
{
+ ColumnSelectItemSegment columnSelectItemSegment = new
ColumnSelectItemSegment("text", new ColumnSegment(0, 10, "name"));
+ columnSelectItemSegment.setAlias("alias");
+ Optional<Projection> projection = new
ProjectionEngine().createProjection(null, columnSelectItemSegment);
+ assertTrue(projection.isPresent());
+ assertTrue(projection.get() instanceof ColumnProjection);
Review comment:
Should use assertThat and instanceOf to instead of assertTrue
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services