()
| 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() { |
nothing calls this directly
no test coverage detected