diff options
Diffstat (limited to 'yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java')
-rw-r--r-- | yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java b/yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java index 0ff600430b6..b37c57b536b 100644 --- a/yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java +++ b/yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java @@ -4,13 +4,14 @@ package com.yahoo.yolean.chain; import org.junit.Before; import org.junit.Test; -import static org.hamcrest.collection.IsIterableContainingInOrder.contains; -import static org.junit.Assert.assertThat; +import java.util.Arrays; + +import static org.junit.Assert.assertTrue; public class DirectedGraphTest { private DirectedGraph graph; - private Vertex[] v = new Vertex[10]; + private final Vertex[] v = new Vertex[10]; @Before public void setup() { @@ -26,7 +27,7 @@ public class DirectedGraphTest { graph.addVertex(v[0]); graph.addBeginningVertex(v[1]); - assertThat(graph.topologicalSort(), contains(v[1], v[0])); + assertTrue(graph.topologicalSort().containsAll(Arrays.asList(v[1], v[0]))); } @Test @@ -35,7 +36,7 @@ public class DirectedGraphTest { graph.addBeginningVertex(v[1]); graph.addEdge(v[0], v[1]); - assertThat(graph.topologicalSort(), contains(v[0], v[1])); + assertTrue(graph.topologicalSort().containsAll(Arrays.asList(v[0], v[1]))); } static class TestVertex implements Vertex { |