Exemplo n.º 1
0
        public async Task MatchAsync_should_run_the_onExceptionAsync_For_onExceptionsSync_overload_when_exception()
        {
            Exceptional <int> exceptional = new InvalidOperationException("invalid");

            var result = await exceptional.MatchAsync(
                (ex) => Task.FromResult(ex.Message),
                v => v.ToString()
                ).ConfigureAwait(false);

            result.Should().Be("invalid");
        }