예제 #1
0
        public async Task InvokeAsync_ExecuteFaultsAndFallbackSucceeds()
        {
            var mockStats = new Mock<IStats>();
            var command = new FaultingExecuteWithSuccessfulFallbackCommand
            {
                Stats = mockStats.Object,
            };

            await command.InvokeAsync();

            mockStats.Verify(m => m.Elapsed("mjolnir command test.FaultingExecuteWithSuccessfulFallback fallback", "Success", It.IsAny<TimeSpan>()), Times.Once);
        }
예제 #2
0
 public async Task InvokeAsync_ExecuteFaultsAndFallbackSucceeds_ReturnsFallbackResult()
 {
     var command = new FaultingExecuteWithSuccessfulFallbackCommand();
     var result = await command.InvokeAsync();
     Assert.NotNull(result);
 }