Ejemplo n.º 1
0
        public void CheckIfWeHaveAnyFilms()
        {
            // 1. Arrange

            // 2. Act
            var movieService = new MoviesService(_context);
            var result       = movieService.GetMoviesList();

            // 3. Assert
            Assert.NotEmpty(result);
        }
        public async Task GetEntityListTest()
        {
            var fakeRepositoryMock = new Mock <IMoviesContext>();

            fakeRepositoryMock.Setup(x => x.GetMoviesList()).ReturnsAsync(vars);


            var movieService = new MoviesService(fakeRepositoryMock.Object);


            var result = await movieService.GetMoviesList();

            Assert.Collection(result, var =>
            {
                Assert.Equal("Seb Seb", var.Name);
            },
                              car =>
            {
                Assert.Equal("Ham Ham", var.Name);
            });
        }
Ejemplo n.º 3
0
 private void DownloadMoviesList()
 {
     movies = moviesService.GetMoviesList();
 }