예제 #1
0
 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);
 }
예제 #2
0
        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);
        }
예제 #3
0
 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);
 }
예제 #4
0
        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);
        }