Trying fixing #518. Almost functions work on both Windows and Unix with the NetDriver.

This commit is contained in:
BDisp
2020-11-17 21:57:45 +00:00
parent 204be65f2a
commit bcc31e0da0
17 changed files with 354 additions and 217 deletions

View File

@@ -544,7 +544,7 @@ namespace Terminal.Gui {
[Fact]
public void Initialized_Event_Comparing_With_Added_Event ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = new Toplevel () { Id = "0", };
@@ -643,7 +643,7 @@ namespace Terminal.Gui {
[Fact]
public void Initialized_Event_Will_Be_Invoked_When_Added_Dynamically ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = new Toplevel () { Id = "0", };
@@ -751,7 +751,7 @@ namespace Terminal.Gui {
[Fact]
public void CanFocus_Faced_With_Container_Before_Run ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = Application.Top;
@@ -788,7 +788,7 @@ namespace Terminal.Gui {
[Fact]
public void CanFocus_Faced_With_Container_After_Run ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = Application.Top;
@@ -831,7 +831,7 @@ namespace Terminal.Gui {
[Fact]
public void CanFocus_Container_ToFalse_Turns_All_Subviews_ToFalse_Too ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = Application.Top;
@@ -866,7 +866,7 @@ namespace Terminal.Gui {
[Fact]
public void CanFocus_Container_Toggling_All_Subviews_To_Old_Value_When_Is_True ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = Application.Top;
@@ -910,7 +910,7 @@ namespace Terminal.Gui {
{
// Non-regression test for #882 (NullReferenceException during keyboard navigation when Focused is null)
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
Application.Top.Ready += () => {
Assert.Null (Application.Top.Focused);
@@ -928,7 +928,7 @@ namespace Terminal.Gui {
[Fact]
public void Multi_Thread_Toplevels ()
{
Application.Init (new FakeDriver (), new NetMainLoop (() => FakeConsole.ReadKey (true)));
Application.Init (new FakeDriver (), new FakeMainLoop (() => FakeConsole.ReadKey (true)));
var t = Application.Top;
var w = new Window ();