public void TestEquipToBody_EquippingShieldWhichIsNotUseableByAThief() { Dictionary <Dungeons_and_Dragons.Attribute, int> dict = new Dictionary <Dungeons_and_Dragons.Attribute, int>(); dict.Add(Dungeons_and_Dragons.Attribute.Strength, 15); dict.Add(Dungeons_and_Dragons.Attribute.Dexterity, 10); dict.Add(Dungeons_and_Dragons.Attribute.Intelligence, 3); dict.Add(Dungeons_and_Dragons.Attribute.Wisdom, 8); dict.Add(Dungeons_and_Dragons.Attribute.Constitution, 17); dict.Add(Dungeons_and_Dragons.Attribute.Charisma, 9); int xp = 0; int hp = 3; Thief thief = new Thief("Stickie", Race.Elf, dict, hp, xp); Shield shield = new Shield(); bool valShieldEquipped = thief.EquipToHand(shield, Hand.Left); Assert.IsFalse(valShieldEquipped, "TEST1: It is expected that the a thief cannot equip a shield"); Assert.IsNull(thief.equippedToBody, "TEST2: It was expected that the shield is NOT equipped"); }
public void TestTestEquipToHand_TryingToEquipAmrourToAHandThatShouldEquipToBody() { Dictionary <Dungeons_and_Dragons.Attribute, int> dict = new Dictionary <Dungeons_and_Dragons.Attribute, int>(); dict.Add(Dungeons_and_Dragons.Attribute.Strength, 15); dict.Add(Dungeons_and_Dragons.Attribute.Dexterity, 10); dict.Add(Dungeons_and_Dragons.Attribute.Intelligence, 3); dict.Add(Dungeons_and_Dragons.Attribute.Wisdom, 8); dict.Add(Dungeons_and_Dragons.Attribute.Constitution, 17); dict.Add(Dungeons_and_Dragons.Attribute.Charisma, 9); int xp = 0; int hp = 3; Thief thief = new Thief("Stickie", Race.Elf, dict, hp, xp); LeatherArmour leatherArmour = new LeatherArmour(); bool valArmourEquipped = thief.EquipToHand(leatherArmour, Hand.Right); Assert.IsFalse(valArmourEquipped, "TEST1: It is expected that the Armour will not be equipped"); Assert.IsNull(thief.equippedInRightHand, "TEST2: It was expected that the right hand should be empty"); Assert.IsNull(thief.equippedInLeftHand, "TEST3: It was expected that the left hand should be empty"); }