Add implementation of methods for Path (for testing purpose... ).
This commit is contained in:
parent
ccad590007
commit
f736bf3005
@ -11,6 +11,9 @@ public class PathTest {
|
|||||||
// Small graph use for tests
|
// Small graph use for tests
|
||||||
private static Graph graph;
|
private static Graph graph;
|
||||||
|
|
||||||
|
// List of arcs in the graph.
|
||||||
|
private static Arc[] arcs;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
static void initAll() throws IOException {
|
static void initAll() throws IOException {
|
||||||
|
|
||||||
@ -24,16 +27,12 @@ public class PathTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add arcs...
|
// Add arcs...
|
||||||
new Arc(nodes[0], nodes[1], 10, speed10, null);
|
arcs = new Arc[] { new Arc(nodes[0], nodes[1], 10, speed10, null),
|
||||||
new Arc(nodes[0], nodes[3], 15, speed10, null);
|
new Arc(nodes[0], nodes[3], 15, speed10, null), new Arc(nodes[0], nodes[4], 15, speed20, null),
|
||||||
new Arc(nodes[0], nodes[4], 15, speed20, null);
|
new Arc(nodes[1], nodes[2], 10, speed10, null), new Arc(nodes[2], nodes[3], 20, speed10, null),
|
||||||
new Arc(nodes[1], nodes[2], 10, speed10, null);
|
new Arc(nodes[2], nodes[3], 10, speed10, null), new Arc(nodes[2], nodes[3], 15, speed20, null),
|
||||||
new Arc(nodes[2], nodes[3], 20, speed10, null);
|
new Arc(nodes[3], nodes[0], 15, speed10, null), new Arc(nodes[3], nodes[4], 20, speed20, null),
|
||||||
new Arc(nodes[2], nodes[3], 10, speed10, null);
|
new Arc(nodes[0], nodes[1], 10, speed10, null) };
|
||||||
new Arc(nodes[2], nodes[3], 15, speed20, null);
|
|
||||||
new Arc(nodes[3], nodes[0], 15, speed10, null);
|
|
||||||
new Arc(nodes[3], nodes[4], 20, speed20, null);
|
|
||||||
new Arc(nodes[0], nodes[1], 10, speed10, null);
|
|
||||||
|
|
||||||
graph = new Graph(0, Arrays.asList(nodes));
|
graph = new Graph(0, Arrays.asList(nodes));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user