Refactoring 2

- added a forgotten method in Vertex & test
- fixed Mark, now is Obj
This commit is contained in:
2018-10-16 21:55:27 +02:00
parent 25fb76afcf
commit b441871de0
4 changed files with 37 additions and 17 deletions

View File

@@ -1140,6 +1140,7 @@ public class TestGraph {
shouldThrow(nullException, () -> vertex.addChild(null, 3));
shouldThrow(nullException, () -> vertex.addChild(null, null));
shouldThrow(nullException, () -> vertex.mark(null));
shouldThrow(nullException, () -> vertex.unMark(null));
shouldThrow(nullException, () -> vertex.removeChild(null));
shouldThrow(new NullPointerException(), () -> vertex.visit(null, null));
@@ -1185,6 +1186,13 @@ public class TestGraph {
shouldContain(graph.getMarks(vertex.getValue()), "ciao", "ciao2");
vertex.unMark();
shouldContain(vertex.getMarks());
vertex.mark("cio");
vertex.mark(1);
shouldContain(vertex.getMarks(), "cio", 1);
vertex.unMark(1);
shouldContain(vertex.getMarks(), "cio");
vertex.unMark("cio");
shouldContain(vertex.getMarks());
vertex.removeChild("1");
shouldContain(vertex.getChildren(), "2");