public void Test_Movie_Search_Genre_True()
        {
            FilterModel filters = new FilterModel() { GenreId = 2, UseGenre = true };

            IndexViewModelHomeMade model = new IndexViewModelHomeMade(filters);

            Assert.AreEqual(model.Movies.Count, 6);
        }
        public void Test_Movie_Search_Phrase_Uppercase()
        {
            FilterModel filters = new FilterModel() { SearchToken = "Horns" };

            IndexViewModelHomeMade model = new IndexViewModelHomeMade(filters);

            Assert.AreEqual(model.Movies.Count, 2);
        }
 public IndexViewModelHomeMade(FilterModel filters)
     : this()
 {
     if (filters.SearchToken != null)
     {
         Movies = Movies.Where(c => c.Title.ToLower().Contains(filters.SearchToken.ToLower())).ToList();
     }
     if (filters.UseGenre)
     {
         Movies = Movies.Where(c => c.Genre.Id == filters.GenreId).ToList();
     }
 }