Browse Source

fixed unit tests

Tig 1 year ago
parent
commit
09c7104d07
2 changed files with 4 additions and 3 deletions
  1. 2 2
      UnitTests/Configuration/ConfigurationMangerTests.cs
  2. 2 1
      UnitTests/TestHelpers.cs

+ 2 - 2
UnitTests/Configuration/ConfigurationMangerTests.cs

@@ -816,9 +816,9 @@ public class ConfigurationManagerTests
     }
 
     [Fact]
-    public void UseWithoutResetAsserts ()
+    public void UseWithoutResetDoesNotThrow ()
     {
         Initialize ();
-        Assert.Throws<InvalidOperationException> (() => _ = Settings);
+        _ = Settings;
     }
 }

+ 2 - 1
UnitTests/TestHelpers.cs

@@ -95,8 +95,9 @@ public class AutoInitShutdownAttribute : BeforeAfterTestAttribute
 
         if (AutoInit)
         {
-#if DEBUG_IDISPOSABLE
+            ConfigurationManager.Reset ();
 
+#if DEBUG_IDISPOSABLE
             // Clear out any lingering Responder instances from previous tests
             if (Responder.Instances.Count == 0)
             {