public void GetAllPiesAsync_Throws_Exception_When_RequestProvider_Thhrows_Exception()
        {
            var requestProviderMock = new Mock <IRequestProvider>();

            requestProviderMock
            .Setup(e => e.GetAsync <IList <Pie> >(It.IsAny <string>(), It.IsAny <string>()))
            .Throws(new ArgumentException());

            var casheMock = new Mock <IBaseCacheStrategy>();

            ICatalogDataService dataService
                = new CatalogDataService(requestProviderMock.Object, casheMock.Object);

            Assert.ThrowsAsync <CatalogDataServiceException>(async() => await dataService.GetAllPiesAsync());
        }
        public async Task GetAllPiesAsync()
        {
            var requestProviderMock = new Mock <IRequestProvider>();

            requestProviderMock
            .Setup(e => e.GetAsync <IList <Pie> >(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(Task.FromResult <IList <Pie> >(PieListMock.MockPieCatalog()));

            var casheMock = new Mock <IBaseCacheStrategy>();

            ICatalogDataService dataService
                = new CatalogDataService(requestProviderMock.Object, casheMock.Object);

            var serviceCallResult = await dataService.GetAllPiesAsync();

            Assert.IsNotNull(serviceCallResult);
            Assert.AreEqual(PieListMock.MockPieCatalogCount(), serviceCallResult.Count);
        }