public static void Validate_Throws_If_CallbackPath_Is_Null() { // Arrange var options = new AppleAuthenticationOptions() { ClientId = "my-client-id", GenerateClientSecret = true, CallbackPath = null, }; // Act and Assert Assert.Throws <ArgumentException>("CallbackPath", () => options.Validate()); }
public static void Validate_Throws_If_KeyId_Is_Null_With_Secret_Generation() { // Arrange var options = new AppleAuthenticationOptions() { ClientId = "my-client-id", GenerateClientSecret = true, KeyId = null, }; // Act and Assert Assert.Throws <ArgumentException>("KeyId", () => options.Validate()); }
public static void Validate_Throws_If_ClientSecretExpiresAfter_Is_Zero_With_Secret_Generation() { // Arrange var options = new AppleAuthenticationOptions() { ClientId = "my-client-id", GenerateClientSecret = true, KeyId = "my-key-id", TeamId = "my-team-id", ClientSecretExpiresAfter = TimeSpan.Zero, }; // Act and Assert Assert.Throws <ArgumentOutOfRangeException>("ClientSecretExpiresAfter", () => options.Validate()); }