private void TestThatTwoHandedWeaponsCannotBeEquippedWithOffHands(EquipmentClass testCandidate) { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass offHand = new OneHandedSword(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new OneHandedMace(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new Wand(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new Shield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new ForceShield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new ArrowQuiver(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); offHand = new BoltQuiver(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); }
private void TestThatOneHandedWeaponCannotBeEquippedWithQuivers(EquipmentClass equipmentWithQuiver, EquipmentClass equipmentWithBoltQuiver) { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass arrowQuiver = new ArrowQuiver(); playerEquipment.EquipInOffHand(arrowQuiver); playerEquipment.EquipInMainHand(equipmentWithQuiver); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); EquipmentClass boltQuiver = new BoltQuiver(); playerEquipment.EquipInOffHand(boltQuiver); playerEquipment.EquipInMainHand(equipmentWithBoltQuiver); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); }
public void TestThatArrowQuiverCannotBeEquippedWhenNonBowIsInMainHand() { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass mainHandEquipment = new OneHandedSword(); EquipmentClass offHand = new ArrowQuiver(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); EquipmentClass offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new OneHandedMace(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new Wand(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new TwoHandedSword(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new TwoHandedMace(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new MagicStaff(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new CrossBow(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new Bow(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(offHand); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.EqualTo(offHand)); }
public void TestThatArrowQuiverCanBeEquippedInOffHandWithNothingPresent() { EquipmentClass testCandidate = new ArrowQuiver(); TestThatGivenEquipmentCanBeEequippedInOffHandSlot(testCandidate); }