예제 #1
0
        public void GetAllVehiclesTest()
        {
            AdministrationBE            abe = new AdministrationBE();
            List <Contract.dto.Vehicle> l   = abe.GetAllVehicles();

            Assert.AreNotEqual(0, l.Count);
        }
예제 #2
0
        public void GetAllReservationsTest()
        {
            AdministrationBE abe = new AdministrationBE();
            List <Contract.dto.Reservation> l = abe.GetAllReservations();

            Assert.AreNotEqual(0, l.Count);
        }
예제 #3
0
        public void DeleteVehicleTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Vehicle item = UnitTest.TestHelpers.randomVehicle();
            item = abe.CreateVehicle(item);
            Assert.IsTrue(abe.DeleteVehicle(item));
        }
예제 #4
0
        public void DeleteTripTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Trip item = UnitTest.TestHelpers.randomTrip();
            item = abe.CreateTrip(item);
            Assert.IsTrue(abe.DeleteTrip(item));
        }
예제 #5
0
        public void DeleteRouteTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Route item = UnitTest.TestHelpers.randomRoute();
            item.RouteId = 0;
            item         = abe.CreateRoute(item);
            Assert.IsTrue(abe.DeleteRoute(item));
        }
예제 #6
0
        public void GetTripTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Trip newItem = UnitTest.TestHelpers.randomTrip();
            newItem = abe.CreateTrip(newItem);
            Contract.dto.Trip item = abe.GetTrip(newItem.TripId);
            Assert.AreEqual(newItem.TripId, item.TripId);
        }
예제 #7
0
        public void DeleteCustomerTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Customer c = UnitTest.TestHelpers.randomCustomer();
            c.CustomerId = 0;
            c            = abe.CreateCustomer(c);
            Assert.IsTrue(abe.DeleteCustomer(c));
        }
예제 #8
0
        public void CreateReservationTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Reservation item = UnitTest.TestHelpers.randomReservation();
            item.ReservationId = 0;
            item = abe.CreateReservation(item);
            Assert.AreNotEqual(0, item.ReservationId);
        }
예제 #9
0
        public void CreateTripTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Trip item = UnitTest.TestHelpers.randomTrip();
            item.TripId = 0;
            item        = abe.CreateTrip(item);
            Assert.AreNotEqual(0, item.TripId);
        }
예제 #10
0
        public void GetDockTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Dock newItem = UnitTest.TestHelpers.randomDock();
            newItem = abe.CreateDock(newItem);
            Contract.dto.Dock item = abe.GetDock(newItem.DockId);
            Assert.AreEqual(newItem.DockId, item.DockId);
        }
예제 #11
0
        public void GetVehicleTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Vehicle newItem = UnitTest.TestHelpers.randomVehicle();
            newItem = abe.CreateVehicle(newItem);
            Contract.dto.Vehicle item = abe.GetVehicle(newItem.VehicleId);
            Assert.AreEqual(newItem.VehicleId, item.VehicleId);
        }
예제 #12
0
        public void CreateVehicleTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Vehicle item = UnitTest.TestHelpers.randomVehicle();
            item.VehicleId = 0;
            item           = abe.CreateVehicle(item);
            Assert.AreNotEqual(0, item.VehicleId);
        }
예제 #13
0
        public void CreateDockTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Dock item = UnitTest.TestHelpers.randomDock();
            item.DockId = 0;
            item        = abe.CreateDock(item);
            Assert.AreNotEqual(0, item.DockId);
        }
예제 #14
0
        public void DeleteFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId = 0;
            item         = abe.CreateFerry(item);
            Assert.IsTrue(abe.DeleteFerry(item));
        }
예제 #15
0
        public void GetRouteTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Route newItem = UnitTest.TestHelpers.randomRoute();
            newItem = abe.CreateRoute(newItem);
            Contract.dto.Route item = abe.GetRoute(newItem.RouteId);
            Assert.AreEqual(newItem.RouteId, item.RouteId);
        }
예제 #16
0
        public void GetReservationTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Reservation newItem = UnitTest.TestHelpers.randomReservation();
            newItem = abe.CreateReservation(newItem);
            Contract.dto.Reservation item = abe.GetReservation(newItem.ReservationId);
            Assert.AreEqual(newItem.ReservationId, item.ReservationId);
        }
예제 #17
0
        public void GetFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry newItem = UnitTest.TestHelpers.randomFerry();
            newItem = abe.CreateFerry(newItem);
            Contract.dto.Ferry item = abe.GetFerry(newItem.FerryId);
            Assert.AreEqual(newItem.FerryId, item.FerryId);
        }
예제 #18
0
        public void CreateFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId = 0;
            item         = abe.CreateFerry(item);
            Assert.AreNotEqual(0, item.FerryId);
        }
예제 #19
0
        public void DeleteDockTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Dock item = UnitTest.TestHelpers.randomDock();
            item.DockId = 0;
            item        = abe.CreateDock(item);
            Assert.IsTrue(abe.DeleteDock(item));
        }
예제 #20
0
        public void CreateCustomerAdministrationTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Customer c = UnitTest.TestHelpers.randomCustomer();
            c.CustomerId = 0;
            c            = abe.CreateCustomer(c);

            Assert.AreNotEqual(0, c.CustomerId);
        }
예제 #21
0
        public void UpdateDockTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Dock item = UnitTest.TestHelpers.randomDock();
            item.DockId   = 0;
            item          = abe.CreateDock(item);
            item.DockName = "I HATE CRUD UNIT TESTING";
            item          = abe.UpdateDock(item);
            Assert.AreEqual("I HATE CRUD UNIT TESTING", item.DockName);
        }
예제 #22
0
        public void UpdateVehicleTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Vehicle item = UnitTest.TestHelpers.randomVehicle();
            item.VehicleId   = 0;
            item             = abe.CreateVehicle(item);
            item.VehicleSize = int.MaxValue;
            item             = abe.UpdateVehicle(item);
            Assert.AreEqual(int.MaxValue, item.VehicleSize);
        }
예제 #23
0
        public void UpdateFerryTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Ferry item = UnitTest.TestHelpers.randomFerry();
            item.FerryId   = 0;
            item           = abe.CreateFerry(item);
            item.FerryName = "ANDERS AND";
            item           = abe.UpdateFerry(item);

            Assert.AreEqual("ANDERS AND", item.FerryName);
        }
예제 #24
0
        public void UpdateCustomerTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Customer c = UnitTest.TestHelpers.randomCustomer();
            c.CustomerId        = 0;
            c                   = abe.CreateCustomer(c);
            c.AmountOfFreeRides = int.MaxValue;
            c                   = abe.UpdateCustomer(c);

            Assert.AreEqual(int.MaxValue, c.AmountOfFreeRides);
        }
예제 #25
0
        public void UpdateReservationTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Reservation item = UnitTest.TestHelpers.randomReservation();
            item.ReservationId = 0;
            item            = abe.CreateReservation(item);
            item.TotalPrice = double.MaxValue;
            item            = abe.UpdateReservation(item);

            Assert.AreEqual(double.MaxValue, item.TotalPrice);
        }
예제 #26
0
        public void UpdateRouteTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Route item = UnitTest.TestHelpers.randomRoute();
            item.RouteId  = 0;
            item          = abe.CreateRoute(item);
            item.Duration = int.MaxValue;
            item          = abe.UpdateRoute(item);

            Assert.AreEqual(int.MaxValue, item.Duration);
        }
예제 #27
0
        public void UpdateTripTest()
        {
            AdministrationBE abe = new AdministrationBE();

            Contract.dto.Trip item = UnitTest.TestHelpers.randomTrip();
            item.TripId    = 0;
            item           = abe.CreateTrip(item);
            item.TripPrice = double.MaxValue;
            item           = abe.UpdateTrip(item);

            Assert.AreEqual(double.MaxValue, item.TripPrice);
        }