Exemplo n.º 1
0
        public ObtainingATwoPair()
        {
            var diceSet  = new DiceRoll(_bothPairs);
            var pairRule = new PairRule();

            result = pairRule.CountPoints(diceSet);
        }
Exemplo n.º 2
0
        public void Awards100PtsForPairOfFives()
        {
            var diceSet  = new DiceRoll(_pairOfFives);
            var pairRule = new PairRule();

            var result = pairRule.CountPoints(diceSet);

            Assert.True(result.Points == _fivesPoints, $"Expected {_fivesPoints} combination, but got {result.Points} instead.");
        }
Exemplo n.º 3
0
        public void OccursWhenTwoFivesAreRolled()
        {
            var diceSet  = new DiceRoll(_pairOfFives);
            var pairRule = new PairRule();

            var result = pairRule.CountPoints(diceSet);

            Assert.True(result.DiceCombination == _combination, $"Expected {_combination} combination, but got {result.DiceCombination} instead.");
        }
Exemplo n.º 4
0
        public void IfNonOnesOrFivesAreRolled(DieRoll[] dice)
        {
            var diceSet  = new DiceRoll(dice);
            var pairRule = new PairRule();

            var result = pairRule.CountPoints(diceSet);

            Assert.True(result.DiceCombination == _combination, $"Expected {_combination} combination, but got {result.DiceCombination} instead.");
            Assert.True(result.Points == _points, $"Expected {_points} combination, but got {result.Points} instead.");
        }