public void CheckCorrectPath_RoadToCity_StraightWay() { List <string> test = new List <string>() { "СПб", "Москва" }; string fileName = "_Test_Example.txt"; Lab3.Floyd_Warshall algTest = new Floyd_Warshall(fileName); Assert.AreEqual(test.SequenceEqual(algTest.Path("СПб", "Москва")), true); }
public void CheckCorrectPath_RoadToCity_ManyPoints() { List <string> test = new List <string>() { "Москва", "СПб", "Владивосток" }; string fileName = "_Test_Example.txt"; Lab3.Floyd_Warshall algTest = new Floyd_Warshall(fileName); Assert.AreEqual(test.SequenceEqual(algTest.Path("Москва", "Владивосток")), true); }
public void CheckCorrectPath_IncorrectNameCity() { try { string fileName = "_Test_Example.txt"; Lab3.Floyd_Warshall algTest = new Floyd_Warshall(fileName); algTest.Path("Москва", "Сельдерей"); } catch (Exception e) { Assert.AreEqual(e.Message, "You entered incorrect name of second city!"); } }
public void CheckCorrectPath_NoWay() { try { string fileName = "_Test_NoWay.txt"; Lab3.Floyd_Warshall algTest = new Floyd_Warshall(fileName); var testtt = algTest.Path("1", "2"); } catch (Exception e) { Assert.AreEqual(e.Message, "There is no way!"); } }