Search in sources :

Example 1 with SchoolToken

use of plugin.primitive.spell.SchoolToken in project pcgen by PCGen.

the class SpellsTokenTest method testValidSchool.

/**
	 * Check that a School qualifier is parsed correctly.
	 * @throws PersistenceLayerException If an error occurs.
	 */
public void testValidSchool() throws PersistenceLayerException {
    TokenRegistration.register(new SchoolToken());
    SpellSchool schoolA = primaryContext.getReferenceContext().constructNowIfNecessary(SpellSchool.class, "Abjuration");
    SpellSchool schoolB = secondaryContext.getReferenceContext().constructNowIfNecessary(SpellSchool.class, "Abjuration");
    CDOMObject a = (CDOMObject) construct(primaryContext, "Endure Elements");
    a.addToListFor(ListKey.SPELL_SCHOOL, schoolA);
    CDOMObject c = (CDOMObject) construct(secondaryContext, "Remove Curse");
    c.addToListFor(ListKey.SPELL_SCHOOL, schoolB);
    runRoundRobin("SPELLS|SCHOOL=Abjuration");
}
Also used : SpellSchool(pcgen.cdom.identifier.SpellSchool) CDOMObject(pcgen.cdom.base.CDOMObject) SchoolToken(plugin.primitive.spell.SchoolToken) SubSchoolToken(plugin.primitive.spell.SubSchoolToken)

Aggregations

CDOMObject (pcgen.cdom.base.CDOMObject)1 SpellSchool (pcgen.cdom.identifier.SpellSchool)1 SchoolToken (plugin.primitive.spell.SchoolToken)1 SubSchoolToken (plugin.primitive.spell.SubSchoolToken)1