[ 
https://issues.apache.org/jira/browse/TINKERPOP-1437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15497514#comment-15497514
 ] 

ASF GitHub Bot commented on TINKERPOP-1437:
-------------------------------------------

Github user okram commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/426#discussion_r79258254
  
    --- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DedupTest.java
 ---
    @@ -73,6 +77,40 @@
     
         public abstract Traversal<Vertex, String> 
get_g_V_both_both_dedup_byXoutE_countX_name();
     
    +    public abstract Traversal<Vertex, String> 
get_g_V_out_in_valuesXnameX_fold_dedupXlocalX_unfold();
    +
    +    public abstract Traversal<Vertex, Map<String, String>> 
get_g_V_out_in_asXxX_in_asXyX_selectXx_yX_byXnameX_fold_dedupXlocal_x_yX_unfold();
    +
    +    @Test
    +    @LoadGraphWith(MODERN)
    +    public void g_V_out_in_valuesXnameX_fold_dedupXlocalX_unfold() {
    +        final Traversal<Vertex, String> traversal = 
get_g_V_out_in_valuesXnameX_fold_dedupXlocalX_unfold();
    +        final List<String> names = traversal.toList();
    +        assertEquals(3, names.size());
    +        assertThat(names, containsInAnyOrder("marko", "josh", "peter"));
    +    }
    +
    +    @Test
    +    @LoadGraphWith(MODERN)
    +    public void 
g_V_out_in_asXxX_in_asXyX_selectXx_yX_byXnameX_fold_dedupXlocal_x_yX_unfold() {
    +        final Traversal<Vertex, Map<String, String>> traversal = 
get_g_V_out_in_asXxX_in_asXyX_selectXx_yX_byXnameX_fold_dedupXlocal_x_yX_unfold();
    +        final List<Map<String,String>> names = traversal.toList();
    +        assertEquals(6, names.size());
    --- End diff --
    
    You can use the `checkResult` and `MapMaker` to make this cleaner if you 
like. Check `WhereTest` for examples:
    
    ```
        @Test
        @LoadGraphWith(MODERN)
        public void 
g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX()
 {
            final Traversal<Vertex, Map<String, String>> traversal = 
get_g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX();
            printTraversalForm(traversal);
            checkResults(makeMapList(3,
                    "a", "peter", "c", "lop", "d", "josh",
                    "a", "peter", "c", "lop", "d", "marko",
                    "a", "josh", "c", "lop", "d", "marko",
                    "a", "josh", "c", "lop", "d", "peter"), traversal);
        }
    ```


> Add tests for dedup(Scope) in DedupTest
> ---------------------------------------
>
>                 Key: TINKERPOP-1437
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1437
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: test-suite
>    Affects Versions: 3.1.4
>            Reporter: stephen mallette
>            Priority: Minor
>
> There are no tests in the test suite that exercise:
> {code}
> public default GraphTraversal<S, E> dedup(final Scope scope, final String... 
> dedupLabels) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to