You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/10/09 14:43:38 UTC

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #3199: improved coverage for package of preprocessor

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:
users@infra.apache.org


With regards,
Apache Git Services