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

@@ -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);