public void Delete_ShouldReturnOk() { //arrange Place place = TestDataHelper.GeneratePlace(); var placeController = new PlaceController(TestDataHelper.GetIPlaceRepositoryMock(place)); //act placeController.Create(place); IHttpActionResult response = placeController.Delete(place.Id); //assert Assert.IsTrue(response is OkResult); }
public void Delete_NonExistPlace_ShouldReturnNotFound() { //arrange Place place = TestDataHelper.GeneratePlace(); var placeController = new PlaceController(TestDataHelper.GetIPlaceRepositoryMock(null)); //act IHttpActionResult response = placeController.Delete(place.Id); //assert Console.WriteLine(response); Assert.IsTrue(response is NotFoundResult); }