public void TestLocationFunctionality() { BusRouteGuider.View.SearchRoute alg = new BusRouteGuider.View.SearchRoute(); String actual = ""; String expected = "success"; Dictionary<String, BusRouteGuider.View.Location> locations = alg.getAllLocations(); if (locations.ContainsKey("Warakapola")) { actual = "success"; } Assert.AreEqual(expected, actual); }
public void TestLocationFunctionality() { BusRouteGuider.View.SearchRoute alg = new BusRouteGuider.View.SearchRoute(); String actual = ""; String expected = "success"; Dictionary <String, BusRouteGuider.View.Location> locations = alg.getAllLocations(); if (locations.ContainsKey("Warakapola")) { actual = "success"; } Assert.AreEqual(expected, actual); }
public void TestBusesAtALocationFunctionality() { BusRouteGuider.View.SearchRoute alg = new BusRouteGuider.View.SearchRoute(); String town = "Moratuwa"; Dictionary<String, BusRouteGuider.View.Location> locations = alg.getAllLocations(); LinkedList<BusRouteGuider.View.Route> list = locations[town].getRoutes(); String expected = "success"; String actual = ""; foreach (BusRouteGuider.View.Route r in list) { if (r.getRouteNumber().Equals("430")) { actual = "success"; } } Assert.AreEqual(expected, actual); }
public void TestBusesAtALocationFunctionality() { BusRouteGuider.View.SearchRoute alg = new BusRouteGuider.View.SearchRoute(); String town = "Moratuwa"; Dictionary <String, BusRouteGuider.View.Location> locations = alg.getAllLocations(); LinkedList <BusRouteGuider.View.Route> list = locations[town].getRoutes(); String expected = "success"; String actual = ""; foreach (BusRouteGuider.View.Route r in list) { if (r.getRouteNumber().Equals("430")) { actual = "success"; } } Assert.AreEqual(expected, actual); }