public GamesController(IGamesRepository gamesRepository, IBetsRepository betsRepository, IBetsResolver betsResolver, ILoggedUserProvider loggedUserProvider, IDateTimeProvider dateTimeProvider, IUsersRepository usersRepository, IActionLogsRepository actionLogsRepository) { if (gamesRepository == null) { throw new ArgumentNullException("gamesRepository"); } this.gamesRepository = gamesRepository; if (betsRepository == null) { throw new ArgumentNullException("betsRepository"); } this.betsRepository = betsRepository; if (betsResolver == null) { throw new ArgumentNullException("betsResolver"); } this.betsResolver = betsResolver; if (loggedUserProvider == null) { throw new ArgumentNullException("loggedUserProvider"); } this.loggedUserProvider = loggedUserProvider; if (dateTimeProvider == null) { throw new ArgumentNullException("dateTimeProvider"); } this.dateTimeProvider = dateTimeProvider; if (dateTimeProvider == null) { throw new ArgumentNullException("dateTimeProvider"); } this.dateTimeProvider = dateTimeProvider; if (usersRepository == null) { throw new ArgumentNullException("usersRepository"); } this.usersRepository = usersRepository; if (actionLogsRepository == null) { throw new ArgumentNullException("actionLogsRepository"); } this.actionLogsRepository = actionLogsRepository; }
private GamesController CreateController(IGamesRepository gamesRepository, IBetsRepository betsRepository, IBetsResolver betsResolver, ILoggedUserProvider userProvider, IDateTimeProvider dateTimeProvider) { var actionLogsRepository = new Mock <IActionLogsRepository>(); return(new GamesController(gamesRepository, betsRepository, betsResolver, userProvider, dateTimeProvider, actionLogsRepository.Object)); }