@Test public void testApplyCharacterCharacter() { final Character caster = MockFactory.mockCharacter(); final Character target = MockFactory.mockCharacter(); spellNoStaff.apply(caster, target); spellWithStaff.apply(caster, target); try { spellNoStaffObject.apply(caster, target); fail("Effect not targeting character was applied succesfully to one."); } catch (final InvalidTargetException e) { } verify(caster, times(2)).addToMana(-REQUIRED_MANA); }
public void apply(Character caster, Character target) { for (int i = 0; i < effects.length; i++) { effects[i].apply(caster, target); } caster.addToMana(-requiredMana); }
Spell { public void apply(Character caster, Character target) { for (int i = 0; i < effects.length; i++) { effects[i].apply(caster, target); } caster.addToMana(-requiredMana); } }
Spell { public void apply(Character caster, Character target) { for (int i = 0; i < effects.length; i++) { effects[i].apply(caster, target); } caster.addToMana(-requiredMana); } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); }
Spell { public void apply(Character caster, Character target) { for (int i = 0; i < effects.length; i++) { effects[i].apply(caster, target); } caster.addToMana(-requiredMana); } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); boolean requiresStaff(); int getRequiredStaffPower(); int getRequiredMana(); int getRequiredSkill(); boolean appliesTo(Character caster, Character target); boolean appliesTo(Character caster, WorldObject target); void apply(Character caster, Character target); void apply(Character caster, WorldObject target); String getName(); String getDescription(); boolean isNegative(); int getFX(); int getSound(); String getMagicWords(); int getId(); }
Spell { public void apply(Character caster, Character target) { for (int i = 0; i < effects.length; i++) { effects[i].apply(caster, target); } caster.addToMana(-requiredMana); } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); boolean requiresStaff(); int getRequiredStaffPower(); int getRequiredMana(); int getRequiredSkill(); boolean appliesTo(Character caster, Character target); boolean appliesTo(Character caster, WorldObject target); void apply(Character caster, Character target); void apply(Character caster, WorldObject target); String getName(); String getDescription(); boolean isNegative(); int getFX(); int getSound(); String getMagicWords(); int getId();  }