MCPcopy Index your code
hub / github.com/Col-E/Recaf / testDirectedParents

Method testDirectedParents

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

Source from the content-addressed store, hash-verified

123 }
124
125 @Test
126 public void testDirectedParents() {
127 // Create a set of vertex names that are parents of "5"
128 Set<String> children = directedGraph.getVertex(5).getAllDirectedParents(true)
129 .map(String::valueOf)
130 .collect(Collectors.toSet());
131 // Ensure all expected vertices are in the results, all others are not in results
132 String[] expected = new String[]{"5", "6", "3", "1"};
133 String[] unexpected = new String[]{"4", "2"};
134 for(String s : expected) {
135 assertTrue(children.contains(s));
136 }
137 for(String s : unexpected) {
138 assertFalse(children.contains(s));
139 }
140 }
141
142 @Test
143 public void testIsDirectedRoot() {

Callers

nothing calls this directly

Calls 4

getAllDirectedParentsMethod · 0.80
getVertexMethod · 0.65
mapMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected