Exemplo n.º 1
0
        public void Reward_threshold_is_null_if_player_deposited_more_then_requires_last_tier()
        {
            var bonus  = CreateBonusWithHighDepositTiers(false);
            var player = BonusRepository.GetLockedPlayer(PlayerId);

            MakeDeposit(PlayerId, 1100);

            var bonusRewardThreshold = new Core.Entities.Bonus(bonus).CalculateRewardThreshold(player);

            Assert.Null(bonusRewardThreshold);
        }
Exemplo n.º 2
0
        public void Reward_threshold_is_calculated_correctly()
        {
            var bonus  = CreateBonusWithHighDepositTiers(false);
            var player = BonusRepository.GetLockedPlayer(PlayerId);

            MakeDeposit(PlayerId, 950);

            var bonusRewardThreshold = new Core.Entities.Bonus(bonus).CalculateRewardThreshold(player);

            Assert.AreEqual(1000, bonusRewardThreshold.DepositAmountRequired);
            Assert.AreEqual(100, bonusRewardThreshold.BonusAmount);
            Assert.AreEqual(50, bonusRewardThreshold.RemainingAmount);
        }