public void DeleteEngineNotFound() { // Set up Prerequisites var controller = new EnginesController(); // Act var actionResult = controller.DeleteEngine(5); // Assert Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult)); }
public void DeleteEngineOk() { // Set up Prerequisites var controller = new EnginesController(); // Act var actionResult = controller.DeleteEngine(4); var contentResult = actionResult as OkNegotiatedContentResult <Engine>; // Assert the result Assert.AreEqual(4, contentResult.Content.id); }