test: update WithCustomCryptoProvider null test to expect ArgumentNullException

This commit is contained in:
Stevan Freeborn
2026-04-02 20:49:25 -05:00
parent 258c3dfed5
commit 0eefe1ce6a
@@ -265,11 +265,12 @@ public class SecureConfigBuilderTests
}
[Fact]
public void WithCustomCryptoProvider_WithNullFactory_ItShouldSetNull()
public void WithCustomCryptoProvider_WithNullFactory_ItShouldThrowArgumentNullException()
{
_sut.WithCustomCryptoProvider(null!);
var act = () => _sut.WithCustomCryptoProvider(null!);
_sut.CryptoProviderFactory.Should().BeNull();
act.Should().Throw<ArgumentNullException>()
.WithParameterName("cryptoProviderFactory");
}
[Fact]