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