diff --git a/tests/StevanFreeborn.Extensions.Configuration.Secure.Tests/Unit/Configuration/SecureConfigBuilderTests.cs b/tests/StevanFreeborn.Extensions.Configuration.Secure.Tests/Unit/Configuration/SecureConfigBuilderTests.cs index 2ebe46b..f2219df 100644 --- a/tests/StevanFreeborn.Extensions.Configuration.Secure.Tests/Unit/Configuration/SecureConfigBuilderTests.cs +++ b/tests/StevanFreeborn.Extensions.Configuration.Secure.Tests/Unit/Configuration/SecureConfigBuilderTests.cs @@ -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() + .WithParameterName("cryptoProviderFactory"); } [Fact]