public async Task TeamProfilesController_Delete_Test3() { // Initialization TeamProfilesController ctl = new TeamProfilesController(); // To test if it is null var result = await ctl.Delete(1); Assert.IsNotNull(result); // To test if it is a valid id var model = (ProfileIndexViewModel)((ViewResult)result).Model; Assert.IsNotNull(model); }
public async Task TeamProfilesController_Delete_Test2() { // Initialization TeamProfilesController ctl = new TeamProfilesController(); // To test if it is null var result = await ctl.Delete(21); Assert.IsNotNull(result); // To test if it is a valid id Assert.IsInstanceOfType(result, typeof(HttpNotFoundResult)); var model = (HttpNotFoundResult)result; Assert.AreEqual(404, model.StatusCode); }