public void Should_Return_True_When_Add_Car() { var car = AddCar(999); var result = CarService.AddNewCar(car); Assert.IsTrue(result); }
public ActionResult AddNewCar([FromBody] Car car) { var success = _carService.AddNewCar(car); if (success) { return(Ok(car)); } return(BadRequest()); }