public void HasPermissionTest() { var attribute = new Web.Attributes.ActionFilters.AllowAnonymousAttribute(); var mockRepo = new MockRepository(); var context = mockRepo.DynamicMock<ActionExecutingContext>(); mockRepo.ReplayAll(); Assert.IsTrue(attribute.HasPermission(context)); mockRepo.VerifyAll(); }
public void HasPermissionTest() { var attribute = new Web.Attributes.ActionFilters.AllowAnonymousAttribute(); var mockRepo = new MockRepository(); var context = mockRepo.DynamicMock <ActionExecutingContext>(); mockRepo.ReplayAll(); Assert.IsTrue(attribute.HasPermission(context)); mockRepo.VerifyAll(); }