public void WhenShopRepositoryReturnNullThenEmptyCollectionIsReturned()
        {
            var shopRepository = new Mock <IShopRepository>();

            shopRepository.Setup(r => r.GetAllShops()).Returns((IEnumerable <Shop>)null);
            var shopService = new ShopRepositoryService(shopRepository.Object, Mock.Of <IUserRepository>());

            IEnumerable <ShopDto> shops = shopService.GetAllShops();

            shops.Should().BeEmpty();
        }
        public void WhenShopRepositoryReturnSomeRecordsThenAllRecordsAreMappedIntoShopDto()
        {
            var shopRepository = new Mock <IShopRepository>();

            shopRepository.Setup(r => r.GetAllShops()).Returns(new List <Shop>()
            {
                Mock.Of <Shop>(), Mock.Of <Shop>()
            });
            var shopService = new ShopRepositoryService(shopRepository.Object, Mock.Of <IUserRepository>());

            IEnumerable <ShopDto> shops = shopService.GetAllShops();

            shops.Should().NotBeEmpty();
            shops.Should().HaveCount(2);
        }