Files
Terminal.Gui/Tests/UnitTests/ConsoleDrivers/ConsoleScrolllingTests.cs
Tig fdeaa8331b Fixes #4298 - Updates test namespaces (#4299)
* Refactored test namespaces.
Moved some tests that were in wrong project.
Code cleanup

* Parrallel -> Parallel
2025-10-20 14:14:38 -06:00

39 lines
1.1 KiB
C#

using Xunit.Abstractions;
// Alias Console to MockConsole so we don't accidentally use Console
using Console = Terminal.Gui.Drivers.FakeConsole;
namespace UnitTests.DriverTests;
public class ConsoleScrollingTests
{
private readonly ITestOutputHelper output;
public ConsoleScrollingTests (ITestOutputHelper output)
{
ConsoleDriver.RunningUnitTests = true;
this.output = output;
}
[Theory]
[InlineData (typeof (FakeDriver))]
////[InlineData (typeof (DotNetDriver))]
//[InlineData (typeof (ANSIDriver))]
////[InlineData (typeof (WindowsDriver))]
////[InlineData (typeof (UnixDriver))]
public void Left_And_Top_Is_Always_Zero (Type driverType)
{
var driver = (FakeDriver)Activator.CreateInstance (driverType);
Application.Init (driver);
Assert.Equal (0, Console.WindowLeft);
Assert.Equal (0, Console.WindowTop);
driver.SetWindowPosition (5, 5);
Assert.Equal (0, Console.WindowLeft);
Assert.Equal (0, Console.WindowTop);
Application.Shutdown ();
}
}