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(); }
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); }