コード例 #1
0
        public void InsertCarTest()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            //If the vehicle data is null
            testObject.InsertCar(null, "1", "1", "2015-04-04T10:30:00.0000000");
        }
コード例 #2
0
        public void InsertCarTest7()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            testObject.SetupPark("3", "3");
            //If parameters are null
            testObject.InsertCar(new VehicleModels.Car("VT2222VT", "Joe Doe", "4"), "two", "tree", "i have no watch");
        }
コード例 #3
0
        public void InsertCarTest5()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            testObject.SetupPark("3", "3");
            //If the data is not in valid format
            testObject.InsertCar(new VehicleModels.Car("VT2222VT", "Joe Doe", "4"), "1", "1", "04-04-2015");
        }
コード例 #4
0
        public void InsertCarTest2()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            testObject.SetupPark("3", "3");
            //If the place number is bigger than the existing one
            testObject.InsertCar(new VehicleModels.Car("VT2222VT", "John Doe", "3"), "1", "33", "2015-04-04T10:30:00.0000000");
        }
コード例 #5
0
        public void InsertCarTest4()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            testObject.SetupPark("3", "3");
            //If the object data is whitespace
            //This will return a handled exception, but there are checks before creating the object in the code
            testObject.InsertCar(new VehicleModels.Car("", "", ""), "1", "1", "2015-04-04T10:30:00.0000000");
        }
コード例 #6
0
        public void InsertCarTest3()
        {
            VehicleParkCommands testObject = new VehicleParkCommands();

            testObject.SetupPark("3", "3");
            //If the license plate is not valid
            //This will return a handled exception, but there are checks before creating the object in the code
            testObject.InsertCar(new VehicleModels.Car("VT222V", "John Doe", "3"), "1", "1", "2015-04-04T10:30:00.0000000");
        }