Esempio n. 1
0
        public void TestMethod7()
        {
            var path = new PathFinder.PathFinder(BrokenMaps.CreateSampleMap());

            // 'A' is disconnected, expect failure
            path.GetShortestRoute('H', 'A');
            // Should throw an exception because FindShortestRoute was unsuccessful
            path.GetDistance();
        }
Esempio n. 2
0
        public void TestMethod1()
        {
            var result = _pathFinder.GetShortestRoute('B', 'H');

            Assert.AreEqual('B', result[0].Name);
            Assert.AreEqual('D', result[1].Name);
            Assert.AreEqual('G', result[2].Name);
            Assert.AreEqual('H', result[3].Name);
            Assert.AreEqual(10, _pathFinder.GetDistance());
        }