コード例 #1
0
        public void ScoreSheet_ThreeOfAKindUnset_RecordThreeOfAKindWithValidSetAsTwenty()
        {
            // Arrange
            var dice = _testDieFactory.CreateDieEnumerable(new[] { 3, 3, 5, 6, 3 });

            _diceCup.Setup(x => x.Dice).Returns(dice);
            _diceOfAKindValidator.Setup(x => x.IsValid(3, dice)).Returns(true);

            // Act
            int?threeOfAKindScore = _scoreSheet.RecordThreeOfAKind(_diceCup.Object);

            //Assert
            _scoreSheet.ThreeOfAKind.Should().Be(20);
        }