Search in sources :

Example 1 with NoAssociations

use of tokenmodel.testsupport.NoAssociations in project pcgen by PCGen.

the class AddAbilityNormalTest method finishLoad.

@Override
protected void finishLoad() {
    super.finishLoad();
    assocCheck = new NoAssociations(pc);
}
Also used : NoAssociations(tokenmodel.testsupport.NoAssociations)

Example 2 with NoAssociations

use of tokenmodel.testsupport.NoAssociations in project pcgen by PCGen.

the class AbilityDepthTest method runTest.

@Override
protected void runTest() throws Throwable {
    Ability top = createAbility("TopAbility");
    Ability mid = createAbility("MidAbility");
    Ability target = createAbility("TargetAbility");
    ParseResult result = firstToken.parseToken(context, top, firstPrefix + mid.getKeyName());
    if (!result.passed()) {
        result.printMessages();
        fail();
    }
    result = secondToken.parseToken(context, mid, secondPrefix + target.getKeyName());
    if (!result.passed()) {
        result.printMessages();
        fail();
    }
    finishLoad();
    assocCheck = new NoAssociations(pc);
    CNAbilitySelection cas = new CNAbilitySelection(CNAbilityFactory.getCNAbility(AbilityCategory.FEAT, Nature.AUTOMATIC, top));
    assertEquals(0, getCount());
    pc.addAbility(cas, "This", "That");
    //		directAbilityFacet.add(id, cas, UserSelection.getInstance());
    assertTrue(containsExpected(mid));
    assertTrue(containsExpected(target));
    assertEquals(3, getCount());
    pc.removeAbility(cas, "This", "That");
    //		directAbilityFacet.remove(id, cas, UserSelection.getInstance());
    assertEquals(0, getCount());
}
Also used : Ability(pcgen.core.Ability) CNAbility(pcgen.cdom.content.CNAbility) NoAssociations(tokenmodel.testsupport.NoAssociations) ParseResult(pcgen.rules.persistence.token.ParseResult) CNAbilitySelection(pcgen.cdom.helper.CNAbilitySelection)

Example 3 with NoAssociations

use of tokenmodel.testsupport.NoAssociations in project pcgen by PCGen.

the class AddAbilityVirtualTest method finishLoad.

@Override
protected void finishLoad() {
    super.finishLoad();
    assocCheck = new NoAssociations(pc);
}
Also used : NoAssociations(tokenmodel.testsupport.NoAssociations)

Aggregations

NoAssociations (tokenmodel.testsupport.NoAssociations)3 CNAbility (pcgen.cdom.content.CNAbility)1 CNAbilitySelection (pcgen.cdom.helper.CNAbilitySelection)1 Ability (pcgen.core.Ability)1 ParseResult (pcgen.rules.persistence.token.ParseResult)1