Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1437 9666bb3dc -> f93111141


Used assertThat for better output on failure.


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

Branch: refs/heads/TINKERPOP-1437
Commit: c621154e2e1f1c7163266148d5591700555a5ac1
Parents: 9666bb3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Sat Sep 17 03:18:15 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Sat Sep 17 03:18:15 2016 -0400

----------------------------------------------------------------------
 .../gremlin/process/AbstractGremlinProcessTest.java | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c621154e/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
index 201822c..1e37478 100644
--- 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/AbstractGremlinProcessTest.java
@@ -36,6 +36,8 @@ import java.util.Map;
 import java.util.UUID;
 import java.util.stream.Collectors;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -92,13 +94,13 @@ public abstract class AbstractGremlinProcessTest extends 
AbstractGremlinTest {
             counter++;
             final String key = (String) keysClasses[i];
             final Class clazz = (Class) keysClasses[i + 1];
-            assertTrue(sideEffects.keys().contains(key));
-            assertTrue(sideEffects.exists(key));
+            assertThat(sideEffects.keys().contains(key), is(true));
+            assertThat(sideEffects.exists(key), is(true));
             assertEquals(clazz, sideEffects.get((String) 
keysClasses[i]).getClass());
-            assertFalse(sideEffects.exists(UUID.randomUUID().toString()));
+            assertThat(sideEffects.exists(UUID.randomUUID().toString()), 
is(false));
         }
         assertEquals(sideEffects.keys().size(), counter);
-        assertFalse(sideEffects.keys().contains(UUID.randomUUID().toString()));
+        assertThat(sideEffects.keys().contains(UUID.randomUUID().toString()), 
is(false));
         assertEquals(StringFactory.traversalSideEffectsString(sideEffects), 
sideEffects.toString());
     }
 
@@ -113,9 +115,9 @@ public abstract class AbstractGremlinProcessTest extends 
AbstractGremlinTest {
 
         for (T t : results) {
             if (t instanceof Map) {
-                assertTrue("Checking map result existence: " + t, 
expectedResults.stream().filter(e -> e instanceof Map).filter(e -> 
internalCheckMap((Map) e, (Map) t)).findAny().isPresent());
+                assertThat("Checking map result existence: " + t, 
expectedResults.stream().filter(e -> e instanceof Map).filter(e -> 
internalCheckMap((Map) e, (Map) t)).findAny().isPresent(), is(true));
             } else {
-                assertTrue("Checking result existence: " + t, 
expectedResults.contains(t));
+                assertThat("Checking result existence: " + t, 
expectedResults.contains(t), is(true));
             }
         }
         final Map<T, Long> expectedResultsCount = new HashMap<>();
@@ -124,7 +126,7 @@ public abstract class AbstractGremlinProcessTest extends 
AbstractGremlinTest {
         expectedResults.forEach(t -> MapHelper.incr(expectedResultsCount, t, 
1l));
         results.forEach(t -> MapHelper.incr(resultsCount, t, 1l));
         expectedResultsCount.forEach((k, v) -> assertEquals("Checking result 
group counts", v, resultsCount.get(k)));
-        assertFalse(traversal.hasNext());
+        assertThat(traversal.hasNext(), is(false));
     }
 
     public static <T> void checkResults(final Map<T, Long> expectedResults, 
final Traversal<?, T> traversal) {

Reply via email to