public void GetClaimValueAsDouble_ShouldThrowAnExceptionWhenClaimTypeIsEmptyString() { var principal = CreatePrincipal("ClaimType", "TestValue"); Should.Throw <ArgumentException>(() => ClaimsPrincipalExtensions.GetClaimValueAsDouble(principal, string.Empty)); }
public void GetClaimValueAsDecimal_ShouldThrowAnExceptionWhenClaimTypeIsNull() { var principal = CreatePrincipal("ClaimType", "TestValue"); Should.Throw <ArgumentException>(() => ClaimsPrincipalExtensions.GetClaimValueAsDecimal(principal, null !)); }