public async void ShouldReturnNewResponseForDifferentRequest() { var mpkApiClientWithCache = new ShedulesDownloaderWithCache(new ShedulesDownloader(_mpkApiClientStub)); await mpkApiClientWithCache.DownloadShedule(1, "asd"); await mpkApiClientWithCache.DownloadShedule(1, "as"); Assert.Equal(2, _mpkApiClientStub.RequestsCount); }
public async void ShouldReturnCachedResponseForSecondRequest() { var mpkApiClientWithCache = new ShedulesDownloaderWithCache(new ShedulesDownloader(_mpkApiClientStub)); int point = 1; var line = "asd"; await mpkApiClientWithCache.DownloadShedule(point, line); await mpkApiClientWithCache.DownloadShedule(point, line); Assert.Equal(1, _mpkApiClientStub.RequestsCount); }