Exemplo n.º 1
0
        public async Task TestListOfHighestGrossingFromFakeData()
        {
            //AAA
            //Arrange, Act, Assert
            //SUT(System Under Test) MovieService -> GetTopRevenueMovies

            //Arrange
            //process of mocking objects/data/methods...
            //_sut = new MovieServices(new MockMovieRepo());

            //Act
            var movies = await _sut.GetTopRevenueMovies();

            //check the actual output with expected value

            //Assert
            Assert.IsNotNull(movies);
            Assert.IsInstanceOfType(movies, typeof(IEnumerable <MovieResponseModel>));
            Assert.AreEqual(16, movies.Count());
        }