4647484950515253545556
graph.addNode("A"); graph.addNode("B"); graph.addNode("C"); sleep(); graph.addEdge("AB", "A", "B"); graph.addEdge("BC", "B", "C"); graph.addEdge("CA", "C", "A"); sleep(); // graph.clear();
4748495051525354555657
graph.addNode("A"); graph.addNode("B"); graph.addNode("C"); sleep(); graph.addEdge("AB", "A", "B"); graph.addEdge("BC", "B", "C"); graph.addEdge("CA", "C", "A"); sleep(); // graph.clear(); }
4849505152535455565758
graph.addNode("B"); graph.addNode("C"); sleep(); graph.addEdge("AB", "A", "B"); graph.addEdge("BC", "B", "C"); graph.addEdge("CA", "C", "A"); sleep(); // graph.clear(); }
393394395396397398399400401402403
public void testSingle() { SingleGraph graph = new SingleGraph("g"); Node A = graph.addNode("A"); Node B = graph.addNode("B"); graph.addEdge("AB1", "A", "B"); try { graph.addEdge("AB2", "A", "B"); fail(); } catch (Exception e) {
396397398399400401402403404405406
Node B = graph.addNode("B"); graph.addEdge("AB1", "A", "B"); try { graph.addEdge("AB2", "A", "B"); fail(); } catch (Exception e) { // Ok ! }