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);
        }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to