2
0
Эх сурвалжийг харах

Trying to fix unit test failuries

Tig 8 сар өмнө
parent
commit
c23e9dd239

+ 3 - 2
UnitTests/Configuration/ConfigurationMangerTests.cs

@@ -181,6 +181,7 @@ public class ConfigurationManagerTests
     [Fact]
     [Fact]
     public void Load_Raises_Updated ()
     public void Load_Raises_Updated ()
     {
     {
+        ThrowOnJsonErrors = true;
         Locations = ConfigLocations.All;
         Locations = ConfigLocations.All;
         Reset ();
         Reset ();
         Assert.Equal (Key.Esc, (((Key)Settings! ["Application.QuitKey"].PropertyValue)!).KeyCode);
         Assert.Equal (Key.Esc, (((Key)Settings! ["Application.QuitKey"].PropertyValue)!).KeyCode);
@@ -194,8 +195,8 @@ public class ConfigurationManagerTests
         }
         }
 
 
         // Act
         // Act
-        // Do NOT reset
-        Load (false);
+        // Reset to cause load to raise event
+        Load (true);
 
 
         // assert
         // assert
         Assert.True (fired);
         Assert.True (fired);

+ 2 - 0
UnitTests/View/Draw/AllViewsDrawTests.cs

@@ -8,6 +8,8 @@ public class AllViewsDrawTests (ITestOutputHelper _output) : TestsAllViews
     [MemberData (nameof (AllViewTypes))]
     [MemberData (nameof (AllViewTypes))]
     public void AllViews_Draw_Does_Not_Layout (Type viewType)
     public void AllViews_Draw_Does_Not_Layout (Type viewType)
     {
     {
+        Application.ResetState (true);
+
         var view = (View)CreateInstanceIfNotGeneric (viewType);
         var view = (View)CreateInstanceIfNotGeneric (viewType);
 
 
         if (view == null)
         if (view == null)