MCPcopy
hub / github.com/Col-E/Recaf / testDirectedChildren

Method testDirectedChildren

src/test/java/me/coley/recaf/GraphTest.java:110–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 }
109
110 @Test
111 public void testDirectedChildren() {
112 // Create a set of vertex names that are children of "1"
113 Set<String> children = directedGraph.getVertex(1).getAllDirectedChildren(true)
114 .map(String::valueOf)
115 .collect(Collectors.toSet());
116 // Ensure all expected vertices are in the results, all others are not in results
117 for (int i = 1; i < 5; i++) {
118 String num = String.valueOf(i);
119 assertTrue(children.contains(num));
120 }
121 // [6 -> 5] thus is not accessible from branching off of "1".
122 assertFalse(children.contains("6"));
123 }
124
125 @Test
126 public void testDirectedParents() {

Callers

nothing calls this directly

Calls 4

getVertexMethod · 0.65
mapMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected