例如,我有一个下面的图表,它显示了我首先测试深度。我想试着做我的测试,我简单地做了一个图,然后我为这个图做了不同的测试用例。但目前,我似乎在每种测试方法中都创建了一个新的图 @Test DepthFirstTraversal b = new DepthFirstTraversalList<Integer> expected = Arrays
我需要实现一个稀疏图,并对它进行一些junit测试。这是我的图类import java.util.Collection;public class SparseGraphreturn null; return node.get(vertex).keySet();}// end class
这是我的测试&
为此,我使用JGraphT中的Djikstra类构建了一个方法,该方法返回两组节点之间的最短路径。path = new DijkstraShortestPath(graph, v, y);path.getPathLength()Product Version: NetBeans IDE 7.0.1 (Build 20121011-unknown-revn)
Jav