CustomToggle implements AbilityToggle { public CustomToggle toggle(String abilityName, String targetName) { baseMapping.put(abilityName, targetName); return this; } CustomToggle(); @Override boolean isOff(Ability ability); @Override Ability processAbility(Ability ability); CustomToggle toggle(String abilityName, String targetName); CustomToggle turnOff(String ability); static final String OFF; }
@Test public void canProcessAbilities() { String targetName = DefaultAbilities.CLAIM + "1toggle"; toggle = new CustomToggle().toggle(DefaultAbilities.CLAIM, targetName); customBot = new DefaultBot(EMPTY, EMPTY, db, toggle); assertTrue(customBot.abilities().containsKey(targetName)); }