Пример #1
0
 public void DeleteInvalidId()
 {
     var SessionMock = new TestControllerBuilder();
     var controller = new RolesController(new UserRoleBLL(new RoleServiceStub()));
     SessionMock.InitializeController(controller);
     var actionResult = (ViewResult)controller.DeleteConfirmed(99);
     Assert.AreEqual(actionResult.ViewName, "");
 }
Пример #2
0
 public void DeleteRoleValidId()
 {
     var controller = new RolesController(new UserRoleBLL(new RoleServiceStub()));
     var actionResult = (RedirectToRouteResult)controller.DeleteConfirmed(1);
     Assert.AreEqual(actionResult.RouteName, "");
     Assert.AreEqual(actionResult.RouteValues.Values.First(), "Index");
 }