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