| 52 | } |
| 53 | |
| 54 | @Test |
| 55 | public void testChain() { |
| 56 | // one -> two --> three |
| 57 | FlowVertex one = graph.getVertex("test/Chain", "one", "()V"); |
| 58 | FlowVertex two = graph.getVertex("test/Chain", "two", "()V"); |
| 59 | FlowVertex three = graph.getVertex("test/Chain", "three", "()V"); |
| 60 | // Use search to show the path following the chain |
| 61 | SearchResult<ClassReader> result = new ClassDfsSearch(ClassDfsSearch.Type.ALL).find(one, three); |
| 62 | assertNotNull(result); |
| 63 | List<Vertex<ClassReader>> path = result.getPath(); |
| 64 | assertEquals(3, path.size()); |
| 65 | assertEquals(one, path.get(0)); |
| 66 | assertEquals(two, path.get(1)); |
| 67 | assertEquals(three, path.get(2)); |
| 68 | } |
| 69 | |
| 70 | @Test |
| 71 | public void testLoopback() { |