Пример #1
0
        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));
        }
Пример #2
0
        public void FindShortestPath_ThrowsException_ForInvalidStartVertex()
        {
            var graph = new LiteralGraph("A>1>B", true);

            Assert.Throws <ArgumentException>(() => graph.FindShortestPath('Z', 'A'));
        }