From 0eefe1ce6ad17d607a0e8fdc5ca8efa5029347c6 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:49:25 -0500 Subject: [PATCH] test: update WithCustomCryptoProvider null test to expect ArgumentNullException --- .../Unit/Configuration/SecureConfigBuilderTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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]