Fixes #4374 - Nukes all (?) legacy Driver and Application stuff; revamps tests (#4376)

This commit is contained in:
Tig
2025-11-11 16:29:33 -07:00
committed by GitHub
parent 559dea9239
commit d53fcd7485
310 changed files with 14827 additions and 16911 deletions

View File

@@ -1,8 +1,10 @@
// Alias Console to MockConsole so we don't accidentally use Console
using UnitTests;
namespace UnitTests_Parallelizable.DrawingTests;
public class AttributeTests
public class AttributeTests : FakeDriverBase
{
[Fact]
public void Constructor_ParsesNamedColorsAndStyle ()
@@ -36,7 +38,7 @@ public class AttributeTests
public void Constructor_DefaultsToNoneStyle_WhenStyleIsNullOrEmpty ()
{
var attr1 = new Attribute ("White", "Black");
var attr2 = new Attribute ("White", "Black", null);
var attr2 = new Attribute ("White", "Black");
var attr3 = new Attribute ("White", "Black", "");
Assert.Equal (TextStyle.None, attr1.Style);
Assert.Equal (TextStyle.None, attr2.Style);
@@ -103,8 +105,7 @@ public class AttributeTests
[Fact]
public void Constructors_Construct ()
{
var driver = new FakeDriver ();
driver.Init ();
IDriver driver = CreateFakeDriver ();
// Test parameterless constructor
var attr = new Attribute ();
@@ -258,8 +259,7 @@ public class AttributeTests
[Fact]
public void Make_Creates ()
{
var driver = new FakeDriver ();
driver.Init ();
IDriver driver = CreateFakeDriver ();
var fg = new Color ();
fg = new (Color.Red);