Trying to fix init issue in ConfigManager that was causing intermittent unit test fails

This commit is contained in:
Tigger Kindel
2023-03-03 11:09:50 -07:00
parent 22c4fdad24
commit 2cf7757691
3 changed files with 13 additions and 13 deletions

View File

@@ -182,12 +182,13 @@ namespace Terminal.Gui.ConfigurationTests {
/// Save the `config.json` file; this can be used to update the file in `Terminal.Gui.Resources.config.json'.
/// </summary>
/// <remarks>
/// IMPORTANT: For the file generated to be valid, this must be the ONLY test run. Conifg Properties
/// are all satic and thus can be overwritten by other tests.</remarks>
/// IMPORTANT: For the file generated to be valid, this must be the ONLY test run. Config Properties
/// are all static and thus can be overwritten by other tests.</remarks>
[Fact]
public void SaveDefaults ()
{
ConfigurationManager.Initialize ();
ConfigurationManager.Reset ();
// Get the hard coded settings
ConfigurationManager.GetHardCodedDefaults ();
@@ -316,12 +317,11 @@ namespace Terminal.Gui.ConfigurationTests {
[Fact, AutoInitShutdown]
public void TestConfigurationManagerToJson ()
{
ConfigurationManager.Reset ();
ConfigurationManager.GetHardCodedDefaults ();
var stream = ConfigurationManager.ToStream ();
ConfigurationManager.Settings.Update (stream, "TestConfigurationManagerToJson");
}
[Fact, AutoInitShutdown (configLocation: ConfigLocations.None)]