Skip to content

Commit 6515d88

Browse files
committed
Revert Commented out Run_T_Call_Init_ForceDriver_Should_Pick_Correct_Driver
1 parent 8abb13c commit 6515d88

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

Tests/UnitTests/Application/ApplicationTests.cs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,44 +1114,44 @@ public void Run_t_Does_Not_Creates_Top_Without_Init ()
11141114

11151115
private class TestToplevel : Toplevel { }
11161116

1117-
//[Theory(Skip = "MacOS fail")]
1118-
//[InlineData ("v2win", typeof (ConsoleDriverFacade<WindowsConsole.InputRecord>))]
1119-
//[InlineData ("v2net", typeof (ConsoleDriverFacade<ConsoleKeyInfo>))]
1120-
//[InlineData ("FakeDriver", typeof (FakeDriver))]
1121-
//[InlineData ("NetDriver", typeof (NetDriver))]
1122-
//[InlineData ("WindowsDriver", typeof (WindowsDriver))]
1123-
//[InlineData ("CursesDriver", typeof (CursesDriver))]
1124-
//public void Run_T_Call_Init_ForceDriver_Should_Pick_Correct_Driver (string driverName, Type expectedType)
1125-
//{
1126-
// Assert.True (ConsoleDriver.RunningUnitTests);
1127-
1128-
// var result = false;
1129-
1130-
// Task.Run (() =>
1131-
// {
1132-
// Task.Delay (300).Wait ();
1133-
// }).ContinueWith (
1134-
// (t, _) =>
1135-
// {
1136-
// // no longer loading
1137-
// Application.Invoke (() =>
1138-
// {
1139-
// result = true;
1140-
// Application.RequestStop ();
1141-
// });
1142-
// },
1143-
// TaskScheduler.FromCurrentSynchronizationContext ());
1144-
1145-
// Application.ForceDriver = driverName;
1146-
// Application.Run<TestToplevel> ();
1147-
// Assert.NotNull (Application.Driver);
1148-
// Assert.Equal (expectedType, Application.Driver?.GetType ());
1149-
// Assert.NotNull (Application.Top);
1150-
// Assert.False (Application.Top!.Running);
1151-
// Application.Top!.Dispose ();
1152-
// Shutdown ();
1153-
// Assert.True (result);
1154-
//}
1117+
[Theory(Skip = "MacOS fail")]
1118+
[InlineData ("v2win", typeof (ConsoleDriverFacade<WindowsConsole.InputRecord>))]
1119+
[InlineData ("v2net", typeof (ConsoleDriverFacade<ConsoleKeyInfo>))]
1120+
[InlineData ("FakeDriver", typeof (FakeDriver))]
1121+
[InlineData ("NetDriver", typeof (NetDriver))]
1122+
[InlineData ("WindowsDriver", typeof (WindowsDriver))]
1123+
[InlineData ("CursesDriver", typeof (CursesDriver))]
1124+
public void Run_T_Call_Init_ForceDriver_Should_Pick_Correct_Driver (string driverName, Type expectedType)
1125+
{
1126+
Assert.True (ConsoleDriver.RunningUnitTests);
1127+
1128+
var result = false;
1129+
1130+
Task.Run (() =>
1131+
{
1132+
Task.Delay (300).Wait ();
1133+
}).ContinueWith (
1134+
(t, _) =>
1135+
{
1136+
// no longer loading
1137+
Application.Invoke (() =>
1138+
{
1139+
result = true;
1140+
Application.RequestStop ();
1141+
});
1142+
},
1143+
TaskScheduler.FromCurrentSynchronizationContext ());
1144+
1145+
Application.ForceDriver = driverName;
1146+
Application.Run<TestToplevel> ();
1147+
Assert.NotNull (Application.Driver);
1148+
Assert.Equal (expectedType, Application.Driver?.GetType ());
1149+
Assert.NotNull (Application.Top);
1150+
Assert.False (Application.Top!.Running);
1151+
Application.Top!.Dispose ();
1152+
Shutdown ();
1153+
Assert.True (result);
1154+
}
11551155

11561156
[Fact]
11571157
public void Run_T_With_Legacy_Driver_Does_Not_Call_ResetState_After_Init ()

0 commit comments

Comments
 (0)