You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/03/10 17:49:24 UTC
incubator-tinkerpop git commit: Add tests for IteratorUtils.concat.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master b662049d5 -> e7d623d51
Add tests for IteratorUtils.concat.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e7d623d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e7d623d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e7d623d5
Branch: refs/heads/master
Commit: e7d623d51ba8a630e3b848e627807e3c7e4f55d7
Parents: b662049
Author: Stephen Mallette <sp...@apache.org>
Authored: Tue Mar 10 12:49:11 2015 -0400
Committer: Stephen Mallette <sp...@apache.org>
Committed: Tue Mar 10 12:49:11 2015 -0400
----------------------------------------------------------------------
.../gremlin/util/iterator/IteratorUtilsTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e7d623d5/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java
index 7cdf7b2..42f185c 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java
@@ -375,6 +375,21 @@ public class IteratorUtilsTest {
assertIterator(IteratorUtils.filter(iterable, s -> s.equals("test1")).iterator(), 1);
}
+ @Test
+ public void shouldConcatIterators() {
+ final List<String> iterable1 = new ArrayList<>();
+ iterable1.add("test1");
+ iterable1.add("test2");
+ iterable1.add("test3");
+
+ final List<String> iterable2 = new ArrayList<>();
+ iterable2.add("test4");
+ iterable2.add("test5");
+ iterable2.add("test6");
+
+ assertIterator(IteratorUtils.concat(iterable1.iterator(), iterable2.iterator()), 6);
+ }
+
public <S> void assertIterator(final Iterator<S> itty, final int size) {
for (int ix = 0; ix < size; ix++) {