diff options
author | gjoranv <gv@verizonmedia.com> | 2022-01-14 23:22:58 +0100 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-01-14 23:22:58 +0100 |
commit | 122ad4b50aa3f8f4191fdd28e4c6a5593d44a88e (patch) | |
tree | 6c907713e8089cbb679cb52ed5d9ea02405c3dc1 /yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java | |
parent | 5fc49290a0f02896619fbf2bc2e6a0fb46b7f21a (diff) |
Remove tests for code to be removed in Vespa 8
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 | 55 |
1 files changed, 0 insertions, 55 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 deleted file mode 100644 index 6b9b29729c7..00000000000 --- a/yolean/src/test/java/com/yahoo/yolean/chain/DirectedGraphTest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.yolean.chain; - -import org.junit.Before; -import org.junit.Test; - -import java.util.Arrays; - -import static org.junit.Assert.assertTrue; - -public class DirectedGraphTest { - - private DirectedGraph graph; - private final Vertex[] v = new Vertex[10]; - - @Before - public void setup() { - for (int i = 0; i < v.length; i++) { - v[i] = new TestVertex(i); - } - - graph = new DirectedGraph(); - } - - @Test - public void before_all_are_prioritized_first() { - graph.addVertex(v[0]); - graph.addBeginningVertex(v[1]); - - assertTrue(graph.topologicalSort().containsAll(Arrays.asList(v[1], v[0]))); - } - - @Test - public void vertex_can_be_placed_before_before_all_vertices() { - graph.addVertex(v[0]); - graph.addBeginningVertex(v[1]); - graph.addEdge(v[0], v[1]); - - assertTrue(graph.topologicalSort().containsAll(Arrays.asList(v[0], v[1]))); - } - - static class TestVertex implements Vertex { - - private final int id; - - TestVertex(int id) { - this.id = id; - } - - @Override - public String toString() { - return "Vertex{" + id + '}'; - } - } -} |