コード例 #1
0
 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));
 }
コード例 #2
0
 public MovieAction(IMovieRepository movieRepository)
 {
     _movieRepository = movieRepository;
     configuration    = MoviesProfile.MapAllConfiguration();
     _mapper          = configuration.CreateMapper();
 }