コード例 #1
0
        public void StraightValidator_InvalidLargeStraightSet_ReturnsFalse()
        {
            var diceValues = _testDieFactory.CreateDieEnumerable(new[] { 3, 2, 4, 1, 6 });

            StraightValidator straightValidator = new StraightValidator();
            bool result = straightValidator.IsValid(5, diceValues);

            result.Should().BeFalse();
        }
コード例 #2
0
        public void StraightValidator_ValidSmallStraightSet_ReturnsTrue()
        {
            var diceValues = _testDieFactory.CreateDieEnumerable(new[] { 1, 3, 2, 4, 6 });

            StraightValidator straightValidator = new StraightValidator();
            bool result = straightValidator.IsValid(4, diceValues);

            result.Should().BeTrue();
        }