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/05/21 22:49:42 UTC

[2/2] incubator-tinkerpop git commit: Add tests for the Direction enum.

Add tests for the Direction enum.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/02fae63a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/02fae63a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/02fae63a

Branch: refs/heads/master
Commit: 02fae63af66f9593eb3ca02db804e2a11d0ee0a5
Parents: 6153c5f
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu May 21 16:36:01 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu May 21 16:49:32 2015 -0400

----------------------------------------------------------------------
 .../gremlin/structure/DirectionTest.java        | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/02fae63a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/DirectionTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/DirectionTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/DirectionTest.java
new file mode 100644
index 0000000..61ddd53
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/DirectionTest.java
@@ -0,0 +1,25 @@
+package org.apache.tinkerpop.gremlin.structure;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class DirectionTest {
+    @Test
+    public void shouldReturnOppositeOfIn() {
+        assertEquals(Direction.OUT, Direction.IN.opposite());
+    }
+
+    @Test
+    public void shouldReturnOppositeOfOut() {
+        assertEquals(Direction.IN, Direction.OUT.opposite());
+    }
+
+    @Test
+    public void shouldReturnOppositeOfBoth() {
+        assertEquals(Direction.BOTH, Direction.BOTH.opposite());
+    }
+}