diff options
Diffstat (limited to 'container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle')
2 files changed, 14 insertions, 16 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/CycleFinderTest.java b/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/CycleFinderTest.java index 65fbdc578aa..b7ce61c2f1a 100644 --- a/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/CycleFinderTest.java +++ b/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/CycleFinderTest.java @@ -2,7 +2,7 @@ package com.yahoo.container.di.componentgraph.cycle; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; @@ -10,7 +10,7 @@ import static com.yahoo.container.di.componentgraph.cycle.CycleFinderTest.Vertic import static com.yahoo.container.di.componentgraph.cycle.CycleFinderTest.Vertices.B; import static com.yahoo.container.di.componentgraph.cycle.CycleFinderTest.Vertices.C; import static com.yahoo.container.di.componentgraph.cycle.CycleFinderTest.Vertices.D; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author gjoranv @@ -20,7 +20,7 @@ public class CycleFinderTest { enum Vertices {A, B, C, D} @Test - public void graph_without_cycles_returns_no_cycle() { + void graph_without_cycles_returns_no_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, B); graph.edge(B, C); @@ -32,7 +32,7 @@ public class CycleFinderTest { } @Test - public void graph_with_cycle_returns_cycle() { + void graph_with_cycle_returns_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, B); graph.edge(B, C); @@ -43,7 +43,7 @@ public class CycleFinderTest { } @Test - public void graph_with_self_referencing_vertex_returns_cycle() { + void graph_with_self_referencing_vertex_returns_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, A); @@ -52,7 +52,7 @@ public class CycleFinderTest { } @Test - public void leading_nodes_are_stripped_from_cycle() { + void leading_nodes_are_stripped_from_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, B); graph.edge(B, C); @@ -63,7 +63,7 @@ public class CycleFinderTest { } @Test - public void findCycle_is_idempotent_with_cycle() { + void findCycle_is_idempotent_with_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, A); @@ -73,7 +73,7 @@ public class CycleFinderTest { } @Test - public void findCycle_is_idempotent_without_cycle() { + void findCycle_is_idempotent_without_cycle() { var graph = new Graph<Vertices>(); graph.edge(A, B); diff --git a/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/GraphTest.java b/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/GraphTest.java index 526e683ad46..d945b4f0544 100644 --- a/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/GraphTest.java +++ b/container-core/src/test/java/com/yahoo/container/di/componentgraph/cycle/GraphTest.java @@ -2,16 +2,14 @@ package com.yahoo.container.di.componentgraph.cycle; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; import static com.yahoo.container.di.componentgraph.cycle.GraphTest.Vertices.A; import static com.yahoo.container.di.componentgraph.cycle.GraphTest.Vertices.B; import static com.yahoo.container.di.componentgraph.cycle.GraphTest.Vertices.C; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.*; /** * @author gjoranv @@ -21,7 +19,7 @@ public class GraphTest { enum Vertices {A, B, C} @Test - public void vertices_and_edges_are_added_and_can_be_retrieved() { + void vertices_and_edges_are_added_and_can_be_retrieved() { var graph = new Graph<Vertices>(); graph.edge(A, B); graph.edge(B, C); @@ -34,7 +32,7 @@ public class GraphTest { } @Test - public void null_vertices_are_not_allowed() { + void null_vertices_are_not_allowed() { var graph = new Graph<Vertices>(); try { @@ -46,7 +44,7 @@ public class GraphTest { } @Test - public void duplicate_edges_are_ignored() { + void duplicate_edges_are_ignored() { var graph = new Graph<Vertices>(); graph.edge(A, B); graph.edge(A, B); @@ -55,7 +53,7 @@ public class GraphTest { } @Test - public void self_edges_are_allowed() { + void self_edges_are_allowed() { var graph = new Graph<Vertices>(); graph.edge(A, A); |