ThemeScopeTests.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Diagnostics;
  2. using System.Text.Json;
  3. namespace UnitTests_Parallelizable.ConfigurationTests;
  4. public class ThemeScopeTests
  5. {
  6. [Fact]
  7. public void Schemes_Property_Exists ()
  8. {
  9. var scope = new ThemeScope ();
  10. scope.LoadHardCodedDefaults();
  11. Assert.NotEmpty (scope);
  12. Assert.NotNull(scope ["Schemes"].PropertyValue);
  13. Assert.NotEmpty (scope);
  14. }
  15. //[Fact]
  16. //public void RetrievValues_Gets_Default_Values ()
  17. //{
  18. // // Need to call Initialize to setup readonly statics
  19. // ConfigurationManager.Initialize ();
  20. // var themeScope = new ThemeScope ();
  21. // Assert.NotEmpty (themeScope);
  22. // // Schemes exists, but is not initialized
  23. // Assert.Null (themeScope ["Schemes"].PropertyValue);
  24. // themeScope.RetrieveValues ();
  25. // Assert.NotEmpty (themeScope);
  26. // // Schemes exists, and has correct # of eleements
  27. // var schemes = themeScope ["Schemes"].PropertyValue as Dictionary<string, Scheme>;
  28. // Assert.NotNull (schemes);
  29. // Assert.Equal (5, schemes!.Count);
  30. // // Base has correct values
  31. // var baseSchemee = schemes ["Base"];
  32. // Assert.Equal (new Attribute(Color.White, Color.Blue), baseSchemee.Normal);
  33. //}
  34. }