public void GetFilterMovies() { Movie movieFilter = new Movie() { Name = "La Era de Hielo" }; mock.Setup(x => x.GetMovies(It.IsAny <Predicate <Movie> >())).Returns(movies); service.GetMovies(movieFilter); mock.VerifyAll(); }
private void InitData() { moviesService.GetMovies(dataGridViewMovies); SetDataGridViewColumnsWidth(dataGridViewMovies); comboBoxGenre.DataSource = genreService.GetGenres(); comboBoxGenre.ValueMember = "Genre_ID"; comboBoxGenre.DisplayMember = "Name"; comboBoxCategory.Items.Add("3"); comboBoxCategory.Items.Add("12"); comboBoxCategory.Items.Add("16"); comboBoxCategory.Items.Add("18"); textBoxID.Enabled = false; VisibleButtons(false); buttonAdd.Visible = true; ClearInput(); }
private void buttonShowMovies_Click(object sender, EventArgs e) { dataGridViewData.DataSource = null; moviesService.GetMovies(dataGridViewData); SetDataGridViewColumnsWidthMovies(dataGridViewData); showtimes = false; EnableGroupBox(); ClearInput(); }
public async Task <IActionResult> Index() { var movieList = await MoviesService.GetMovies(); var viewModel = new MoviesViewModel { Movies = movieList.Results }; return(View(viewModel)); }
public void get_movies_when_response_from_remote_server_successfull() { //Arrange MoviesService moviesService = new MoviesService(); //Act var actual = moviesService.GetMovies(); //Assert Assert.IsNotNull(actual); Assert.IsTrue(actual.ToList().Any()); }
public void get_movies_when_response_from_remote_server_not_successfull() { //Arrange MoviesService moviesService = new MoviesService(); //Act var actual = moviesService.GetMovies(); //Assert Assert.IsNotNull(actual); //TODO:When this senario(get response when remote server not available/bad response) is implemented only this assertion can be executed. // Assert.IsTrue(!actual.ToList().Any()); }
public ActionResult <string> GetMovies(string id) { return(MoviesService.GetMovies(id)); }
private async Task BindMovies() { Movies = await MoviesService.GetMovies(); }