public void TestThatOneHandedSwordsCannotBeEquippedWithQuivers() { EquipmentClass firstTestCandidate = new OneHandedSword(); EquipmentClass secondTestCandidate = new OneHandedSword(); TestThatOneHandedWeaponCannotBeEquippedWithQuivers(firstTestCandidate, secondTestCandidate); }
public void TestThatOffhandOneHandedSwordsCanOnlyBeEquippedWithOneHandedWeapons() { EquipmentClass offHand = new OneHandedSword(); EquipmentClass secondOffHandInstance = new OneHandedSword(); TestThatOffHanderCanOnlyBeEquippedWithOneHander(offHand, secondOffHandInstance); }
public void TestThatOneHandedSwordsCanBeEquippedWithShieldsAndForceShields() { EquipmentClass firstTestCandidate = new OneHandedSword(); EquipmentClass secondTestCandidate = new OneHandedSword(); TestThatOneHandedWeaponCanBeEquippedWithShieldAndForceShield(firstTestCandidate, secondTestCandidate); }
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 TestThatMainHandEquipmentCanBeEquippedWithSword(EquipmentClass testCandidate, PlayerEquipmentSlots playerEquipment) { EquipmentClass offHandSword = new OneHandedSword(); playerEquipment.EquipInOffHand(offHandSword); playerEquipment.EquipInMainHand(testCandidate); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.EqualTo(testCandidate)); }
public void TestThatOneHandedSwordsCanBeEquippedWithOneHandedWeaponsInOffHand() { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass testCandidate = new OneHandedSword(); TestThatMainHandEquipmentCanBeEquippedWithSword(testCandidate, playerEquipment); testCandidate = new OneHandedSword(); TestThatMainHandEquipmentCanBeEquippedWithMace(testCandidate, playerEquipment); testCandidate = new OneHandedSword(); TestThatMainHandEquipmentCanBeEquippedWithWand(testCandidate, playerEquipment); }
public void TestThatCrossBowsCannotBeEquippedWithWeaponsOrShields() { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass testCandidate = new CrossBow(); EquipmentClass offHand = new OneHandedSword(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); EquipmentClass mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new OneHandedMace(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new Wand(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new Shield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); testCandidate = new CrossBow(); offHand = new ForceShield(); playerEquipment.EquipInOffHand(offHand); playerEquipment.EquipInMainHand(testCandidate); mainHandEquipment = playerEquipment.GetMainHandEquipment(); Assert.That(mainHandEquipment, Is.Null); }
public void TestThatBoltQuiverCannotBeEquippedWhenNonCrossBowIsInMainHand() { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass mainHandEquipment = new OneHandedSword(); EquipmentClass offHand = new BoltQuiver(); 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 Bow(); 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.EqualTo(offHand)); }
public void TestThatOneHandedSwordCanBeEquippedInMainHandWithNothingPresent() { EquipmentClass testCandidate = new OneHandedSword(); EquipInMainHandAndTestThatItIsOccupied(testCandidate); }
public void TestThatOneHandedSwordCanBeEquippedInOffHandWithNothingPresent() { EquipmentClass testCandidate = new OneHandedSword(); TestThatGivenEquipmentCanBeEequippedInOffHandSlot(testCandidate); }
private void TestThatOffHanderCanOnlyBeEquippedWithOneHander(EquipmentClass firstOffHanderInstance, EquipmentClass secondOffHanderInstance) { PlayerEquipmentSlots playerEquipment = new PlayerEquipmentSlots(); EquipmentClass mainHandEquipment = new TwoHandedSword(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); EquipmentClass offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new TwoHandedMace(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new MagicStaff(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new Bow(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new CrossBow(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.Null); mainHandEquipment = new OneHandedSword(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.EqualTo(firstOffHanderInstance)); mainHandEquipment = new OneHandedMace(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(secondOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.EqualTo(secondOffHanderInstance)); mainHandEquipment = new Wand(); playerEquipment.EquipInMainHand(mainHandEquipment); playerEquipment.EquipInOffHand(firstOffHanderInstance); offHandEquipment = playerEquipment.GetOffHandEquipment(); Assert.That(offHandEquipment, Is.EqualTo(firstOffHanderInstance)); }