@Test public void testAppliesToCharacterCharacter() { final Character caster = mock(Character.class); final Character immobilizedTarget = mock(Character.class); when(immobilizedTarget.isImmobilized()).thenReturn(Boolean.TRUE); assertTrue(recoverMobilityEffect.appliesTo(caster, immobilizedTarget)); final Character palayzedTarget = mock(Character.class); when(palayzedTarget.isParalyzed()).thenReturn(Boolean.TRUE); assertTrue(recoverMobilityEffect.appliesTo(caster, palayzedTarget)); final Character normalTarget = mock(Character.class); assertFalse(recoverMobilityEffect.appliesTo(caster, normalTarget)); final Character palayzedDeadTarget = mock(Character.class); when(palayzedDeadTarget.isParalyzed()).thenReturn(Boolean.TRUE); when(palayzedDeadTarget.isDead()).thenReturn(Boolean.TRUE); assertFalse(recoverMobilityEffect.appliesTo(caster, palayzedDeadTarget)); final Character immobilizedDeadTarget = mock(Character.class); when(immobilizedDeadTarget.isImmobilized()).thenReturn(Boolean.TRUE); when(immobilizedDeadTarget.isDead()).thenReturn(Boolean.TRUE); assertFalse(recoverMobilityEffect.appliesTo(caster, immobilizedDeadTarget)); }
@Override public boolean appliesTo(Character caster, Character target) { if (!target.isImmobilized() && !target.isParalyzed()) { return false; } if (target.isDead()) { return false; } return true; }
RecoverMobilityEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!target.isImmobilized() && !target.isParalyzed()) { return false; } if (target.isDead()) { return false; } return true; } }
RecoverMobilityEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!target.isImmobilized() && !target.isParalyzed()) { return false; } if (target.isDead()) { return false; } return true; }  }
RecoverMobilityEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!target.isImmobilized() && !target.isParalyzed()) { return false; } if (target.isDead()) { return false; } return true; }  @Override void apply(Character caster, Character target); @Override boolean appliesTo(Character caster, Character target); @Override boolean appliesTo(Character caster, WorldObject worldobject); @Override void apply(Character caster, WorldObject target); }
RecoverMobilityEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!target.isImmobilized() && !target.isParalyzed()) { return false; } if (target.isDead()) { return false; } return true; }  @Override void apply(Character caster, Character target); @Override boolean appliesTo(Character caster, Character target); @Override boolean appliesTo(Character caster, WorldObject worldobject); @Override void apply(Character caster, WorldObject target);  }