use of de.gurkenlabs.litiengine.abilities.effects.Effect in project litiengine by gurkenlabs.
the class AbilityTests method testEffectInitialization.
@Test
public void testEffectInitialization() {
Creature entity = new Creature();
TestAbility ability = new TestAbility(new Creature());
Effect effect = new TestEffect(ability, EffectTarget.ENEMY);
assertEquals(ability.getAttributes().getDuration().getCurrentValue().intValue(), effect.getDuration());
assertEquals(ability, effect.getAbility());
assertEquals(0, effect.getFollowUpEffects().size());
assertFalse(effect.isActive(entity));
assertArrayEquals(new EffectTarget[] { EffectTarget.ENEMY }, effect.getEffectTargets());
}