Пример #1
0
            public void GivenNullDiceBag_ThenThrowArgumentNullException()
            {
                // arrange
                var actual = new InitiativePassSlot();

                // act
                var results = actual.RollInitiative(null);

                // assert
                Assert.Fail("ArgumentNullException should have been thrown.");
            }
Пример #2
0
            public void GivenDiceBagAndNoInitiativeModifiers_ThenRollInitiativeForCharacter()
            {
                // arrange
                var character = new Character();

                character.Attributes[AttributeType.Intuition] = 4;
                character.Attributes[AttributeType.Reaction]  = 3;
                var mockDiceBag = new Mock <IDiceBag>(MockBehavior.Strict);

                mockDiceBag.Setup(x => x.d6(1)).Returns(new List <int> {
                    6
                });

                var actual = new InitiativePassSlot()
                {
                    Participant = character
                };

                // act
                var results = actual.RollInitiative(mockDiceBag.Object);

                // assert
                Assert.AreEqual(13, results);
            }