public void FindShortestPath_FillsExpectedVertices( [NotNull] string relationships, char startVertex, char endVertex, string expected) { var graph = new LiteralGraph(relationships, true); var seq = graph.FindShortestPath(startVertex, endVertex); Assert.AreEqual(expected, string.Join(",", seq)); }
public void FindShortestPath_ThrowsException_ForInvalidStartVertex() { var graph = new LiteralGraph("A>1>B", true); Assert.Throws <ArgumentException>(() => graph.FindShortestPath('Z', 'A')); }