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 }
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); }
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); }