DriverColorTests.cs 613 B

123456789101112131415161718192021222324
  1. // Alias Console to MockConsole so we don't accidentally use Console
  2. using UnitTests;
  3. namespace DriverTests;
  4. public class DriverColorTests : FakeDriverBase
  5. {
  6. [Fact]
  7. public void Force16Colors_Sets ()
  8. {
  9. // Set the static property before creating the driver
  10. Terminal.Gui.Drivers.Driver.Force16Colors = true;
  11. IDriver driver = CreateFakeDriver ();
  12. Assert.True (driver.Force16Colors);
  13. Assert.True (driver.GetForce16Colors ());
  14. driver.End ();
  15. // Reset for other tests
  16. Terminal.Gui.Drivers.Driver.Force16Colors = false;
  17. }
  18. }