public void Setup()
 {
     _uowMock = new Mock <IUnitOfWork>();
     _manager = new WatchedMoviesStatsManager(_uowMock.Object);
     fakeUser = new User
     {
         Id       = 1,
         Name     = "user",
         Surname  = "user",
         Password = "******",
         Picture  = "picture",
         Email    = "email",
         NotificationsReceived = null,
         NotificationsSent     = null,
         FriendsReceived       = null,
         FriendsSent           = null,
         SavedMovies           = null,
         WatchedMovies         = null
     };
     fakeStatsResult = new WatchedMoviesStats
     {
         UserId      = 1,
         AverageRate = 5,
         TotalCount  = 10,
         TotalTime   = 60
     };
 }
 public WatchedMoviesController(IMapper mapper, IPropertyMappingService service,
                                IPropertyCheckerService checker, IYearStatisticManager yearStatisticManager,
                                IWatchedMoviesStatsManager watchedMoviesStatsManager, IPopularMoviesManager popularMoviesManager,
                                IWatchedMoviesManager watchedMoviesManager)
     : base(mapper, service, checker, yearStatisticManager, watchedMoviesStatsManager, popularMoviesManager,
            watchedMoviesManager)
 {
 }
Ejemplo n.º 3
0
 // watched movies controller
 public BaseController(IMapper mapper, IPropertyMappingService service, IPropertyCheckerService checker,
                       IYearStatisticManager yearStatisticManager, IWatchedMoviesStatsManager watchedMoviesStatsManager,
                       IPopularMoviesManager popularMoviesManager, IWatchedMoviesManager watchedMoviesManager)
 {
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
     _service = service ??
                throw new ArgumentNullException(nameof(service));
     _servicePropertyChecker = checker ??
                               throw new ArgumentNullException(nameof(checker));
     _yearStatisticManager = yearStatisticManager ??
                             throw new ArgumentNullException(nameof(yearStatisticManager));
     _watchedMoviesStatsManager = watchedMoviesStatsManager ??
                                  throw new ArgumentNullException(nameof(watchedMoviesStatsManager));
     _popularMoviesManager = popularMoviesManager ??
                             throw new ArgumentNullException(nameof(popularMoviesManager));
     _watchedMoviesManager = watchedMoviesManager ??
                             throw new ArgumentNullException(nameof(watchedMoviesManager));
 }
Ejemplo n.º 4
0
 public FilmLoFacade(IWatchedMoviesStatsManager watchedMoviesStatsManager)
 {
     WatchedMoviesStatsManager = watchedMoviesStatsManager;
 }