|
@@ -36,7 +36,7 @@ public class TextFormatterDrawTests (ITestOutputHelper output) : FakeDriverBase
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -65,7 +65,7 @@ public class TextFormatterDrawTests (ITestOutputHelper output) : FakeDriverBase
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -105,7 +105,7 @@ public class TextFormatterDrawTests (ITestOutputHelper output) : FakeDriverBase
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
|
|
|
|
|
- tf.Draw (new (Point.Empty, new (width, height)), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (Point.Empty, new (width, height)), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
Rectangle rect = DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
Rectangle rect = DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
Assert.Equal (expectedY, rect.Y);
|
|
Assert.Equal (expectedY, rect.Y);
|
|
|
}
|
|
}
|
|
@@ -134,7 +134,7 @@ public class TextFormatterDrawTests (ITestOutputHelper output) : FakeDriverBase
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -163,7 +163,7 @@ public class TextFormatterDrawTests (ITestOutputHelper output) : FakeDriverBase
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -217,7 +217,7 @@ s")]
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, 20, 20), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, 20, 20), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -267,7 +267,7 @@ s")]
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = width;
|
|
tf.ConstrainToWidth = width;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, 5, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, 5, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
Rectangle rect = DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
Rectangle rect = DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
Assert.Equal (expectedY, rect.Y);
|
|
Assert.Equal (expectedY, rect.Y);
|
|
@@ -328,7 +328,7 @@ B ")]
|
|
|
|
|
|
|
|
tf.ConstrainToWidth = 5;
|
|
tf.ConstrainToWidth = 5;
|
|
|
tf.ConstrainToHeight = height;
|
|
tf.ConstrainToHeight = height;
|
|
|
- tf.Draw (new (0, 0, 5, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, 5, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -346,11 +346,7 @@ B ")]
|
|
|
};
|
|
};
|
|
|
var tf = new TextFormatter { ConstrainToSize = new (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true };
|
|
var tf = new TextFormatter { ConstrainToSize = new (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true };
|
|
|
|
|
|
|
|
- tf.Draw (
|
|
|
|
|
- new (1, 1, 19, 3),
|
|
|
|
|
- attrs [1],
|
|
|
|
|
- attrs [2],
|
|
|
|
|
- driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (1, 1, 19, 3), normalColor: attrs [1], hotColor: attrs [2]);
|
|
|
|
|
|
|
|
Assert.False (tf.FillRemaining);
|
|
Assert.False (tf.FillRemaining);
|
|
|
|
|
|
|
@@ -375,11 +371,7 @@ B ")]
|
|
|
|
|
|
|
|
tf.FillRemaining = true;
|
|
tf.FillRemaining = true;
|
|
|
|
|
|
|
|
- tf.Draw (
|
|
|
|
|
- new (1, 1, 19, 3),
|
|
|
|
|
- attrs [1],
|
|
|
|
|
- attrs [2],
|
|
|
|
|
- driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (1, 1, 19, 3), normalColor: attrs [1], hotColor: attrs [2]);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverAttributesAre (
|
|
DriverAssert.AssertDriverAttributesAre (
|
|
|
@"
|
|
@"
|
|
@@ -422,7 +414,7 @@ Nice Work")]
|
|
|
MultiLine = true
|
|
MultiLine = true
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedText, output, driver);
|
|
|
}
|
|
}
|
|
@@ -448,7 +440,7 @@ Nice Work")]
|
|
|
driver!.SetScreenSize (tfSize.Width, tfSize.Height);
|
|
driver!.SetScreenSize (tfSize.Width, tfSize.Height);
|
|
|
|
|
|
|
|
driver.FillRect (driver.Screen, (Rune)'*');
|
|
driver.FillRect (driver.Screen, (Rune)'*');
|
|
|
- tf.Draw (driver.Screen, Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: driver.Screen, normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
var expectedText = """
|
|
var expectedText = """
|
|
|
UI Catalog: A comprehensive sample library and test app for
|
|
UI Catalog: A comprehensive sample library and test app for
|
|
@@ -575,7 +567,7 @@ Nice Work")]
|
|
|
Size size = tf.FormatAndGetSize ();
|
|
Size size = tf.FormatAndGetSize ();
|
|
|
Assert.Equal (new (expectedWidth, expectedHeight), size);
|
|
Assert.Equal (new (expectedWidth, expectedHeight), size);
|
|
|
|
|
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedDraw, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedDraw, output, driver);
|
|
|
}
|
|
}
|
|
@@ -660,7 +652,7 @@ Nice Work")]
|
|
|
Size size = tf.FormatAndGetSize ();
|
|
Size size = tf.FormatAndGetSize ();
|
|
|
Assert.Equal (new (expectedWidth, expectedHeight), size);
|
|
Assert.Equal (new (expectedWidth, expectedHeight), size);
|
|
|
|
|
|
|
|
- tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default, driver: driver);
|
|
|
|
|
|
|
+ tf.Draw (driver: driver, screen: new (0, 0, width, height), normalColor: Attribute.Default, hotColor: Attribute.Default);
|
|
|
|
|
|
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedDraw, output, driver);
|
|
DriverAssert.AssertDriverContentsWithFrameAre (expectedDraw, output, driver);
|
|
|
}
|
|
}
|