public void GetCar_ShouldNotFindCar() { var controller = new RentCarController(GetTestCars()); var result = controller.GetCar(999); Assert.IsInstanceOfType(result, typeof(NotFoundResult)); }
public void GetCar_ShouldReturnCorrectCar() { var testCars = GetTestCars(); var controller = new RentCarController(testCars); var result = controller.GetCar(4) as OkNegotiatedContentResult <Car>; Assert.IsNotNull(result); Assert.AreEqual(testCars[3].Make, result.Content.Make); }