コード例 #1
0
        public async Task FindAllAsync_WhenNoMerchant_ShouldReturnEmptyList(List <Merchant> merchants, MerchantFinder sut)
        {
            merchants = new List <Merchant>();
            sut.MerchantRepository.FindAllAsync().Returns(merchants);

            var result = await sut.FindAllAsync();

            result.Should().BeEmpty();
        }
コード例 #2
0
        public async Task FindAllAsync_WhenExistsMerchants_ShouldReturnMerchants(List <Merchant> merchants, MerchantFinder sut)
        {
            sut.MerchantRepository.FindAllAsync().Returns(merchants);

            var result = await sut.FindAllAsync();

            result.Should().NotBeNullOrEmpty();
            result.Should().BeEquivalentTo(merchants);
        }