Example #1
0
 public void WhenClaimTypeIsEmptyOrNull_ThrowsArgumentNullException(string claimType)
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         PrincipalExtensions.GetClaimOrDefault(new ClaimsPrincipal(), claimType);
     });
 }
Example #2
0
 public void WhenSelfIsNull_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         PrincipalExtensions.GetClaimOrDefault(null, NuGetClaims.ApiKey);
     });
 }