public async Task HandlesTransformFailure() { // Arrange var spyHandler = new SpyAgentExceptionHandler(); Agent sut = AgentWithSaboteurTransformer(spyHandler); // Act await sut.Start(CancellationToken.None); // Assert Assert.True( spyHandler.HandledTransformationException, "Spy Agent exception handler should have handled transformation exception"); }
public async Task HandlesFailureInUnhappyPath() { // Arrange var spyHandler = new SpyAgentExceptionHandler(); Agent sut = AgentWithUnhappySaboteurSteps(spyHandler); // Act await sut.Start(CancellationToken.None); // Assert Assert.True( spyHandler.HandledErrorException, "Spy Agent exception handler should have handled error exception"); }