Ejemplo n.º 1
0
 public AdminController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService    = gameService;
     _holeService    = holeService;
     _playerService  = playerService;
     _rankingService = rankingService;
 }
 public RankingsPageViewModel(IRankingService rankingService, IClearUserSecurityService clearUserSecurityService,
     IDialogService dialogService, IReadUserSecurityService readUserSecuritService, IKillApplication killApp)
     : base(clearUserSecurityService, dialogService, killApp)
 {
     _rankingService = rankingService;
     _readUserSecurityService = readUserSecuritService;
 }
 public RankingController(IRankingService rankingService,
                          IRankingPointService rankingPointService,
                          INotificationHandler notification) : base(notification)
 {
     _rankingService      = rankingService;
     _rankingPointService = rankingPointService;
 }
Ejemplo n.º 4
0
 public RankingsPageViewModel(IRankingService rankingService, IClearUserSecurityService clearUserSecurityService,
                              IDialogService dialogService, IReadUserSecurityService readUserSecuritService, IKillApplication killApp)
     : base(clearUserSecurityService, dialogService, killApp)
 {
     _rankingService          = rankingService;
     _readUserSecurityService = readUserSecuritService;
 }
Ejemplo n.º 5
0
 public AdminController(IGameService gameService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
Ejemplo n.º 6
0
 public RankingController(IRankingService rankingService,
                          IMapper mapper,
                          ILogger <RankingController> logger)
 {
     _rankingService = rankingService;
     _mapper         = mapper;
     _logger         = logger;
 }
Ejemplo n.º 7
0
 public GameController(IGameService gameService, IShotService shotService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService    = gameService;
     _shotService    = shotService;
     _holeService    = holeService;
     _playerService  = playerService;
     _rankingService = rankingService;
 }
Ejemplo n.º 8
0
        public void ShouldCalculateEstimation_WhenGoodValuesAreProvided()
        {
            IRankingService rankingService = CreateService;

            float estimation = rankingService.GetEstimation(RankingValues.LeftValidValue, RankingValues.RightValidValue);

            Assert.Equal(RankingValues.PreCalculatedLeftEstimation, estimation);
        }
Ejemplo n.º 9
0
 public GameController(IGameService gameService, IShotService shotService, IHoleService holeService, IPlayerService playerService, IRankingService rankingService)
 {
     _gameService = gameService;
     _shotService = shotService;
     _holeService = holeService;
     _playerService = playerService;
     _rankingService = rankingService;
 }
Ejemplo n.º 10
0
        public void ShouldLimitElo_WhenToMuchPointsAreLost()
        {
            IRankingService rankingService = CreateService;
            float           estimation     = rankingService.GetEstimation(RankingValues.Limit, RankingValues.Limit);

            int newElo = rankingService.GetNewElo(RankingValues.Limit, estimation, false);

            Assert.Equal(RankingValues.Limit, newElo);
        }
Ejemplo n.º 11
0
        public void ShouldComputeNewElo_WhenLost()
        {
            IRankingService rankingService = CreateService;
            float           estimation     = rankingService.GetEstimation(RankingValues.LeftValidValue, RankingValues.RightValidValue);

            int newElo = rankingService.GetNewElo(RankingValues.LeftValidValue, estimation, false);

            Assert.Equal(RankingValues.LeftLostExpectedNewElo, newElo);
        }
Ejemplo n.º 12
0
        public void ShouldThrow_WhenInvalidElosAreProvided()
        {
            IRankingService rankingService = CreateService;

            Assert.Throws <Exception>(() =>
            {
                float estimation = rankingService.GetEstimation(-12, 0);
            });
        }
Ejemplo n.º 13
0
 public WarController(IMapper mapper, IRankingService rankingService, IWarRepository warRepo, IMatchFactory matchFactory, IMatchRepository matchRepository, IContestantRepository contestantRepository, IUserRepository userRepository, IVoteRepository voteRepository)
 {
     _mapper               = mapper;
     _rankingService       = rankingService;
     _warRepo              = warRepo;
     _matchFactory         = matchFactory;
     _matchRepository      = matchRepository;
     _contestantRepository = contestantRepository;
     _userRepository       = userRepository;
     _voteRepository       = voteRepository;
 }
        public void SetUp()
        {
            var teams = new List <DataAccess.Team>
            {
                new DataAccess.Team {
                    Id = 1
                },                           // 1 d 1 l = 1 p
                new DataAccess.Team {
                    Id = 2
                },                           // 1 d 1 v = 4 p
                new DataAccess.Team {
                    Id = 3
                },                           // 2 v = 6 p
                new DataAccess.Team {
                    Id = 4
                },                           // 2 l = 0 p
            };

            var games = new List <DataAccess.Game>
            {
                new DataAccess.Game {
                    Team1Id = 1, Team2Id = 2, Team1Goals = 1, Team2Goals = 1, Stage = 1
                },
                new DataAccess.Game {
                    Team1Id = 3, Team2Id = 4, Team1Goals = 1, Team2Goals = 0, Stage = 1
                },
                new DataAccess.Game {
                    Team1Id = 1, Team2Id = 3, Team1Goals = 0, Team2Goals = 1, Stage = 1
                },
                new DataAccess.Game {
                    Team1Id = 2, Team2Id = 4, Team1Goals = 1, Team2Goals = 0, Stage = 1
                },
            };

            var teamsRepository = Substitute.For <IRepository <DataAccess.Team> >();

            teamsRepository.All().ReturnsForAnyArgs(teams);

            var gamesRepository = Substitute.For <IRepository <DataAccess.Game> >();

            gamesRepository.All().ReturnsForAnyArgs(games);

            _rankingService = new RankingService(gamesRepository, teamsRepository);
        }
Ejemplo n.º 15
0
 public RankingController(IRankingService rankingService, IPlayerService playerService, IHoleService holeService)
 {
     _rankingService = rankingService;
     _playerService = playerService;
     _holeService = holeService;
 }
Ejemplo n.º 16
0
 public HomeController(IRankingService rankingService, IPortfolioService portfolioService, IEtfService etfService)
 {
     _rankingService   = rankingService;
     _portfolioService = portfolioService;
     _etfService       = etfService;
 }
 public RankingsController(IRankingService service)
 {
     _rankingService = service;
 }
Ejemplo n.º 18
0
 public ChessService(IRankingService rankingService)
 {
     RankingService = rankingService;
 }
Ejemplo n.º 19
0
 public ChartsController(IRankingService rankingService)
 {
     _rankingService = rankingService;
 }
Ejemplo n.º 20
0
 public AccountController(IRankingService rankingService)
 {
     this._rankingService = rankingService;
 }
Ejemplo n.º 21
0
 public HomeController(IRankingService rankingService, IPlayerService playerService)
 {
     _rankingService = rankingService;
     _playerService = playerService;
 }
Ejemplo n.º 22
0
 public UsersManagerController(IRankingService rankingService, IBetStrategyService betStrategyService)
 {
     this._rankingService = rankingService;
     this._betStrategyService = betStrategyService;
 }
Ejemplo n.º 23
0
 public HomeController(IRankingService rankingService)
 {
     this._rankingService = rankingService;
 }
Ejemplo n.º 24
0
 public MatchService(CatMatchContext context, IRankingService rankingService)
 {
     Context        = context;
     RankingService = rankingService;
 }
Ejemplo n.º 25
0
 public HomeController(IRankingService rankingService)
 {
     this._rankingService = rankingService;
 }
Ejemplo n.º 26
0
 public TableController(IRankingService rankingService, IGameService gameService)
 {
     this._rankingService = rankingService;
     this._gameService    = gameService;
 }
 public void SetUp()
 {
     _rankingService = Substitute.For <IRankingService>();
 }
Ejemplo n.º 28
0
 public QuestionController(IQuestionService questionService, IRankingService rankingService, IMapper mapper)
 {
     _questionService = questionService;
     _rankingService  = rankingService;
     _mapper          = mapper;
 }
Ejemplo n.º 29
0
 public InitialData(IRankingService rankingService, IBetStrategyService betStrategyService)
 {
     _rankingService = rankingService;
     _betStrategyService = betStrategyService;
 }
Ejemplo n.º 30
0
 public HomeController(IRankingService rankingService, IGroupService groupService, IUserService userService)
 {
     _rankingService = rankingService;
     _groupService   = groupService;
     _userService    = userService;
 }
Ejemplo n.º 31
0
 public TableController(IRankingService rankingService, IGameService gameService)
 {
     this._rankingService = rankingService;
     this._gameService = gameService;
 }
Ejemplo n.º 32
0
 public RankingController(IRankingService rankingService, IEmailService emailService)
 {
     this._rankingService = rankingService;
     this._emailService   = emailService;
 }
Ejemplo n.º 33
0
 public RankingController(IRankingService service)
 {
     this._service = service;
 }
Ejemplo n.º 34
0
 public AllRankingController(IRankingService rankingService)
 {
     _rankingService = rankingService;
 }
Ejemplo n.º 35
0
 public ShipsService(IRankingService rankingService, IGameHelper gameHelper)
 {
     RankingService  = rankingService;
     this.gameHelper = gameHelper;
 }
 public RankingController()
 {
     _rankingService = BusinessLogicFactory.GetRankingService();
 }
 public RankingController(IRankingService rankingService)
 {
     _rankingService = rankingService;
 }
 public RankingController(IRankingService rankingService)
 {
     this.rankingService = rankingService;
 }
 public KalamburyService(IRankingService rankingService)
 {
     RankingService = rankingService;
     ApiService     = new ApiService();
 }
Ejemplo n.º 40
0
 public AccountController(IRankingService rankingService)
 {
     this._rankingService = rankingService;
 }
Ejemplo n.º 41
0
 public UsersManagerController(IRankingService rankingService, IBetStrategyService betStrategyService)
 {
     this._rankingService     = rankingService;
     this._betStrategyService = betStrategyService;
 }