Пример #1
0
        public async Task Given_Instance_When_ValidateAsync_Invoked_Then_It_Should_Return_Result()
        {
            var instance = new Mock <IUrl>();

            instance.Setup(p => p.ValidateAsync()).ReturnsAsync(instance.Object);

            var value = Task.FromResult(instance.Object);

            var result = await UrlExtensions.ValidateAsync(value).ConfigureAwait(false);

            result.Should().Be(instance.Object);
        }