Ejemplo n.º 1
0
            public void GivenActionTypeNotInDictionary_ThenThrowNotImplementedException()
            {
                // arrange
                var actual = new InitiativeActionFactory();

                // act
                var results = actual.Create(InitiativeActionType.None);

                // assert
                Assert.Fail("NotImplementedException should have been thrown.");
            }
Ejemplo n.º 2
0
            public void GivenActionTypeIsBlock_ThenCreateReturnsBlockAction()
            {
                // arrange
                var actual = new InitiativeActionFactory();

                // act
                var results = actual.Create(InitiativeActionType.Block);

                // assert
                Assert.AreEqual("Block", results.Name);
                Assert.AreEqual(5, results.InitiativeCost.Cost);
                Assert.IsTrue(results.InitiativeCost.IsCostRequired);
                Assert.AreEqual(2, results.AttributesUsed.Count);
                Assert.IsTrue(results.AttributesUsed.Contains(AttributeType.Reaction));
                Assert.IsTrue(results.AttributesUsed.Contains(AttributeType.Intuition));
                Assert.AreEqual(1, results.SkillsUsed.Count);
                Assert.IsTrue(results.SkillsUsed.Contains(SkillType.UnarmedCombat));
                Assert.AreEqual(LimitType.Physical, results.Limit);
            }