Exemple #1
0
 public async Task HandleProtectedShouldThrowWhenRequirementIsNull()
 {
     var requirement = new TestNameRequirement();
     var context     = new AuthorizationHandlerContext(new List <IAuthorizationRequirement>(), null, null);
     await requirement.HandleProtectedAsync(context, null);
 }
Exemple #2
0
 public async Task HandleProtectedShouldThrowWhenContextIsNull()
 {
     var requirement = new TestNameRequirement();
     await requirement.HandleProtectedAsync(null, new NameAuthorizationRequirement("fdsa"));
 }