示例#1
0
        public void GetResults_NoChooseSpecified_ReturnsAllDice()
        {
            const int multiplicity = 6;
            const int sides        = 6;
            var       diceTerm     = new DiceTerm(multiplicity, sides, 1);
            var       maxRandom    = new MaxRandom();

            IEnumerable <TermResult> results = diceTerm.GetResults(maxRandom);

            Assert.AreEqual(multiplicity, results.Count());
        }
示例#2
0
        public void ReturnsMultiplicityResultsWhenNoChooseSpecified()
        {
            const int multiplicity = 6;
            const int sides        = 6;

            var diceTerm = new DiceTerm(multiplicity, sides, 1);

            var dieRoller = Substitute.For <IDieRoller>();

            dieRoller.RollDie(sides).Returns(sides);

            IEnumerable <TermResult> results = diceTerm.GetResults(dieRoller);

            Assert.AreEqual(multiplicity, results.Count());
        }