public void DeleteGetViewWithNullId() { var controller = new RolesController(new UserRoleBLL(new RoleServiceStub())); var actionResult = (HttpStatusCodeResult)controller.Delete(null); Assert.AreEqual(actionResult.StatusCode, 400); }
public void DeleteGetViewWithValidId() { var controller = new RolesController(new UserRoleBLL(new RoleServiceStub())); var actionResult = (ViewResult)controller.Delete(1); Assert.AreEqual(actionResult.ViewName, ""); }
public void DeleteGetViewWithInvalidId() { var controller = new RolesController(new UserRoleBLL(new RoleServiceStub())); var actionResult = (HttpNotFoundResult)controller.Delete(99); Assert.AreEqual(actionResult.StatusCode, 404); }