mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Refactored test namespaces. Moved some tests that were in wrong project. Code cleanup * Parrallel -> Parallel
39 lines
1.1 KiB
C#
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 ();
|
|
}
|
|
}
|