Exemple #1
0
        public void SetUp()
        {
            dbContext = DbContextUtility.CreateMockDb();
            var game = DbContextUtility.AddNew <Game>(dbContext);

            gameID = game.ID;

            seasonService = Substitute.For <ISeasonService>();
            var logger = Substitute.For <ILogger <SeasonApi> >();

            testObj = new SeasonApi(logger, dbContext, seasonService);
        }
Exemple #2
0
        private void ShowsList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var shows = ShowsList.SelectedItem as TvSeriesTitles;

            SeasonsList.ItemsSource = SeasonApi.GetSeasonListFromApi(shows.show.id);
            SeasonsList.Items.Refresh();
            TBlockName.Text   = $"Selected show: {shows.show.name}";
            TBlockLang.Text   = $"Language: {shows.show.language}";
            TBlockGenres.Text = $"Genre(s): {string.Join(',', shows.show.genres)}";
            if (shows.show.genres.Count == 0)
            {
                TBlockGenres.Text = "Genre(s): N/A";
            }
            TBlockRating.Text = $"Rating: {shows.show.rating.average}";
            if (shows.show.rating.average == null)
            {
                TBlockRating.Text = "Rating: No rating yet";
            }
        }