private GamesController CreateController(IGamesRepository gamesRepository, IBetsRepository betsRepository, IBetsResolver betsResolver, ILoggedUserProvider userProvider, IDateTimeProvider dateTimeProvider)
        {
            var actionLogsRepository = new Mock <IActionLogsRepository>();
            var usersRepository      = new Mock <IUsersRepository>();

            return(new GamesController(gamesRepository, betsRepository, betsResolver, userProvider, dateTimeProvider, usersRepository.Object, actionLogsRepository.Object));
        }
Example #2
0
 public BetValidator(IGamesRepository gamesRepository, IBetsRepository betsRepository, IDateTimeProvider dateTimeProvider, IActionLogsRepository actionLogsRepository)
 {
     this.gamesRepository      = gamesRepository;
     this.betsRepository       = betsRepository;
     this.dateTimeProvider     = dateTimeProvider;
     this.actionLogsRepository = actionLogsRepository;
 }
        private BetsController CreateController(IBetsRepository betsRepository, IBetValidator betValidator, ILoggedUserProvider userProvider, IDateTimeProvider dateTimeProvider)
        {
            var actionLogsRepository = new Mock <IActionLogsRepository>();
            var gamesRepository      = new Mock <IGamesRepository>();

            return(new BetsController(betsRepository, betValidator, userProvider, dateTimeProvider, actionLogsRepository.Object, gamesRepository.Object));
        }
Example #4
0
 public UsersRetriver(IBetsRepository betsRepository, IGeneralBetsRepository generalBetsRepository, IUsersRepository usersRepository, IDateTimeProvider dateTimeProvider)
 {
     this.betsRepository        = betsRepository;
     this.usersRepository       = usersRepository;
     this.generalBetsRepository = generalBetsRepository;
     this.dateTimeProvider      = dateTimeProvider;
 }
Example #5
0
        public BetsController(IBetsRepository betsRepository, IBetValidator betValidator, ILoggedUserProvider userProivider, IDateTimeProvider dateTimeProvider, IActionLogsRepository actionLogsRepository)
        {
            if (betsRepository == null)
            {
                throw new ArgumentNullException("betsRepository");
            }
            this.betsRepository = betsRepository;

            if (betValidator == null)
            {
                throw new ArgumentNullException("betValidator");
            }
            this.betValidator = betValidator;

            if (userProivider == null)
            {
                throw new ArgumentNullException("userProivider");
            }
            this.userProivider = userProivider;

            if (dateTimeProvider == null)
            {
                throw new ArgumentNullException("dateTimeProvider");
            }
            this.dateTimeProvider = dateTimeProvider;

            if (actionLogsRepository == null)
            {
                throw new ArgumentNullException("actionLogsRepository");
            }
            this.actionLogsRepository = actionLogsRepository;
        }
Example #6
0
        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;
        }
Example #7
0
        public BetsController(IBetsRepository betsRepository, IBetValidator betValidator, ILoggedUserProvider userProivider, IDateTimeProvider dateTimeProvider, IActionLogsRepository actionLogsRepository, IGamesRepository gamesRepository)
        {
            userManager = new UserManager <MundialitoUser>(new UserStore <MundialitoUser>(new MundialitoContext()));
            if (gamesRepository == null)
            {
                throw new ArgumentNullException("gamesRepository");
            }
            this.gamesRepository = gamesRepository;

            if (betsRepository == null)
            {
                throw new ArgumentNullException("betsRepository");
            }
            this.betsRepository = betsRepository;

            if (betValidator == null)
            {
                throw new ArgumentNullException("betValidator");
            }
            this.betValidator = betValidator;

            if (userProivider == null)
            {
                throw new ArgumentNullException("userProivider");
            }
            this.userProivider = userProivider;

            if (dateTimeProvider == null)
            {
                throw new ArgumentNullException("dateTimeProvider");
            }
            this.dateTimeProvider = dateTimeProvider;

            if (actionLogsRepository == null)
            {
                throw new ArgumentNullException("actionLogsRepository");
            }
            this.actionLogsRepository = actionLogsRepository;
        }
Example #8
0
 public BetsResolver(IBetsRepository betsRepository, IDateTimeProvider dateTimeProvider, IActionLogsRepository actionLogsRepository)
 {
     this.betsRepository       = betsRepository;
     this.dateTimeProvider     = dateTimeProvider;
     this.actionLogsRepository = actionLogsRepository;
 }
Example #9
0
        private BetsResolver CreateTarget(IBetsRepository betsRepository, IDateTimeProvider dateTimeProvider)
        {
            var actionLogsRepository = new Mock <IActionLogsRepository>();

            return(new BetsResolver(betsRepository, dateTimeProvider, actionLogsRepository.Object));
        }
 public UserBetForHomeTeamHandler(IValidator <UserBetForHomeTeam> validator, IEventBus eventBus, IMapper mapper, IBetsRepository betsRepository) : base(validator, eventBus, mapper)
 {
     _betsRepository = betsRepository;
 }
Example #11
0
        private BetValidator CreateTarget(IGamesRepository gamesRepository, IBetsRepository betsRepository, IDateTimeProvider dateTimeProvider)
        {
            var actionLogsRepository = new Mock <IActionLogsRepository>();

            return(new BetValidator(gamesRepository, betsRepository, dateTimeProvider, actionLogsRepository.Object));
        }