Exemplo n.º 1
0
        public void GetVehicleTypeOfParkedVehicleNullTest()
        {
            // Setup
            VehicleType expectedVehicleType = VehicleType.Car;
            VehicleType actualVehicleType;
            string      registrationNumber = "abc123";

            string parkingSlot = null;

            // Act
            actualVehicleType = ParkingSlot.GetVehicleTypeOfParkedVehicle(parkingSlot, registrationNumber);
            // Should throw exception
        }
Exemplo n.º 2
0
        public void GetVehicleTypeOfParkedVehicle2McSecondTest()
        {
            // Setup
            VehicleType expectedVehicleType = VehicleType.Mc;
            VehicleType actualVehicleType;
            string      registrationNumber = "abc123";

            string parkingSlot = "lkj987:abc123";

            // Act
            actualVehicleType = ParkingSlot.GetVehicleTypeOfParkedVehicle(parkingSlot, registrationNumber);

            // Verify
            Assert.AreEqual(expectedVehicleType, actualVehicleType);
        }
Exemplo n.º 3
0
        public void GetVehicleTypeOfParkedVehicleCarTest()
        {
            // Setup
            VehicleType expectedVehicleType = VehicleType.Car;
            VehicleType actualVehicleType;
            string      registrationNumber = "abc123";

            string parkingSlot = "abc123,1999-01-02 13:34";

            // Act
            actualVehicleType = ParkingSlot.GetVehicleTypeOfParkedVehicle(parkingSlot, registrationNumber);

            // Verify
            Assert.AreEqual(expectedVehicleType, actualVehicleType);
        }