Exemple #1
0
        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");
        }
Exemple #2
0
        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");
        }