This commit is contained in:
tznind
2025-03-20 08:39:46 +00:00
committed by Tig
parent bacac70588
commit 266f03daef
5 changed files with 105 additions and 22 deletions

View File

@@ -50,9 +50,10 @@ public class BasicFluentAssertionTests
using GuiTestContext c = With.A<Window> (40, 10, d)
.Add (lbl)
.Then (() => Assert.Equal (lbl.Frame.Width, 38)) // Window has 2 border
.Then (() => Assert.Equal (38, lbl.Frame.Width)) // Window has 2 border
.ResizeConsole (20, 20)
.Then (() => Assert.Equal (lbl.Frame.Width, 18))
.Then (() => Assert.Equal (18, lbl.Frame.Width))
.WriteOutLogs (_out)
.Stop ();
}

View File

@@ -6,7 +6,7 @@ namespace UnitTests.ConsoleDrivers.V2;
public class MainLoopCoordinatorTests
{
[Fact]
public void TestMainLoopCoordinator_InputCrashes_ExceptionSurfacesMainThread ()
public async Task TestMainLoopCoordinator_InputCrashes_ExceptionSurfacesMainThread ()
{
var mockLogger = new Mock<ILogger> ();
@@ -26,7 +26,7 @@ public class MainLoopCoordinatorTests
// StartAsync boots the main loop and the input thread. But if the input class bombs
// on startup it is important that the exception surface at the call site and not lost
var ex = Assert.ThrowsAsync<AggregateException>(c.StartAsync).Result;
var ex = await Assert.ThrowsAsync<AggregateException>(c.StartAsync);
Assert.Equal ("Crash on boot", ex.InnerExceptions [0].Message);