mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
This commit is contained in:
@@ -6,7 +6,7 @@ using Xunit.Abstractions;
|
||||
namespace UnitTests;
|
||||
|
||||
/// <summary>
|
||||
/// Provides xUnit-style assertions for <see cref="IConsoleDriver"/> contents.
|
||||
/// Provides xUnit-style assertions for <see cref="IDriver"/> contents.
|
||||
/// </summary>
|
||||
internal partial class DriverAssert
|
||||
{
|
||||
@@ -25,12 +25,12 @@ internal partial class DriverAssert
|
||||
/// <paramref name="expectedAttributes"/>.
|
||||
/// </param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="driver">The IConsoleDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <param name="driver">The IDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <param name="expectedAttributes"></param>
|
||||
public static void AssertDriverAttributesAre (
|
||||
string expectedLook,
|
||||
ITestOutputHelper output,
|
||||
IConsoleDriver? driver = null,
|
||||
IDriver? driver = null,
|
||||
params Attribute [] expectedAttributes
|
||||
)
|
||||
{
|
||||
@@ -142,12 +142,12 @@ internal partial class DriverAssert
|
||||
/// <summary>Asserts that the driver contents match the expected contents, optionally ignoring any trailing whitespace.</summary>
|
||||
/// <param name="expectedLook"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="driver">The IConsoleDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <param name="driver">The IDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <param name="ignoreLeadingWhitespace"></param>
|
||||
public static void AssertDriverContentsAre (
|
||||
string expectedLook,
|
||||
ITestOutputHelper output,
|
||||
IConsoleDriver? driver = null,
|
||||
IDriver? driver = null,
|
||||
bool ignoreLeadingWhitespace = false
|
||||
)
|
||||
{
|
||||
@@ -188,12 +188,12 @@ internal partial class DriverAssert
|
||||
/// </summary>
|
||||
/// <param name="expectedLook"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="driver">The IConsoleDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <param name="driver">The IDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
|
||||
/// <returns></returns>
|
||||
public static Rectangle AssertDriverContentsWithFrameAre (
|
||||
string expectedLook,
|
||||
ITestOutputHelper output,
|
||||
IConsoleDriver? driver = null
|
||||
IDriver? driver = null
|
||||
)
|
||||
{
|
||||
List<List<Rune>> lines = [];
|
||||
@@ -339,7 +339,7 @@ internal partial class DriverAssert
|
||||
/// </summary>
|
||||
/// <param name="driver">if null uses <see cref="Application.Driver"/></param>
|
||||
/// <param name="expectedColors"></param>
|
||||
internal static void AssertDriverUsedColors (IConsoleDriver? driver = null, params Attribute [] expectedColors)
|
||||
internal static void AssertDriverUsedColors (IDriver? driver = null, params Attribute [] expectedColors)
|
||||
{
|
||||
driver ??= Application.Driver;
|
||||
Cell [,] contents = driver?.Contents!;
|
||||
|
||||
Reference in New Issue
Block a user