Beispiel #1
0
        public async Task ShowsService_GetShowsAsync_Returns_Shows()
        {
            await _showService.GetShowsAsync();

            _mockedClient.Verify(x => x.RetrieveAsync(_fakeApiUri), Times.Once);
            _mockedRepository.Verify(x => x.GetNewShows(_shows), Times.AtMostOnce);
        }
Beispiel #2
0
    private async Task FetchAsync()
    {
        var podcastsModels = await showsService.GetShowsAsync();

        if (podcastsModels == null)
        {
            await Shell.Current.DisplayAlert(
                AppResource.Error_Title,
                AppResource.Error_Message,
                AppResource.Close);

            return;
        }

        await CategoriesVM.InitializeAsync();

        shows = await ConvertToViewModels(podcastsModels);

        UpdatePodcasts(shows);
    }