Exemple #1
0
        // ReSharper disable once InconsistentNaming
        public void HasGenre_Detects_If_Genre_Is_Loaded()
        {
            var genre = new Genre();

            var show = new Show();

            show.ShowsGenres.Add(new ShowsGenres(genre));

            Assert.True(show.HasGenre(genre));
        }
Exemple #2
0
        // ReSharper disable once InconsistentNaming
        public void HasGenre_Detects_If_GenreId_Matches()
        {
            var genre = new Genre
            {
                Id = 42
            };

            var show = new Show();

            show.ShowsGenres.Add(new ShowsGenres
                {
                    GenreId = genre.Id
                });

            Assert.True(show.HasGenre(genre));
        }
Exemple #3
0
        // ReSharper disable once InconsistentNaming
        public void HasGenre_Does_Not_Detect_If_GenreId_Is_Zero()
        {
            var genre = new Genre();

            var show = new Show();

            show.ShowsGenres.Add(new ShowsGenres
                {
                    GenreId = 0
                });

            Assert.False(show.HasGenre(genre));
        }