public void SetUp() { _mapper = MoviesProfile.MapAllConfiguration().CreateMapper(); _movieRepositoryMock = new Mock <IMovieRepository>(MockBehavior.Default); action = new MovieAction(_movieRepositoryMock.Object); SetUpMockData(); _movieRepositoryMock.Setup(x => x.GetMovies()).Returns(Task.FromResult(movies)); }
public MovieAction(IMovieRepository movieRepository) { _movieRepository = movieRepository; configuration = MoviesProfile.MapAllConfiguration(); _mapper = configuration.CreateMapper(); }