Search in sources :

Example 21 with ClassSpellList

use of pcgen.cdom.list.ClassSpellList in project pcgen by PCGen.

the class ClassesTokenTest method testRoundRobinType.

@Test
public void testRoundRobinType() throws PersistenceLayerException {
    assertEquals(0, primaryContext.getWriteMessageCount());
    primaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Wizard");
    ClassSpellList classSpellList = secondaryContext.getReferenceContext().constructCDOMObject(ClassSpellList.class, "Psion");
    classSpellList.addType(Type.getConstant("Psionic"));
    CDOMGroupRef<ClassSpellList> typeReference = primaryContext.getReferenceContext().getManufacturer(ClassSpellList.class).getTypeReference("Psionic");
    typeReference.addResolution(classSpellList);
    runRoundRobin("TYPE=Psionic=1[PRERACE:1,Human]");
}
Also used : ClassSpellList(pcgen.cdom.list.ClassSpellList) Test(org.junit.Test)

Aggregations

ClassSpellList (pcgen.cdom.list.ClassSpellList)21 Test (org.junit.Test)7 AssociatedPrereqObject (pcgen.cdom.base.AssociatedPrereqObject)7 Spell (pcgen.core.spell.Spell)7 DomainSpellList (pcgen.cdom.list.DomainSpellList)6 PCClass (pcgen.core.PCClass)6 CDOMListObject (pcgen.cdom.base.CDOMListObject)4 Domain (pcgen.core.Domain)4 ArrayList (java.util.ArrayList)3 CDOMList (pcgen.cdom.base.CDOMList)3 CDOMReference (pcgen.cdom.base.CDOMReference)3 MasterListInterface (pcgen.cdom.base.MasterListInterface)3 AvailableSpell (pcgen.cdom.helper.AvailableSpell)3 StringTokenizer (java.util.StringTokenizer)2 DataSetID (pcgen.cdom.enumeration.DataSetID)2 CharacterSpell (pcgen.core.character.CharacterSpell)2 Prerequisite (pcgen.core.prereq.Prerequisite)2 StringWriter (java.io.StringWriter)1 Field (java.lang.reflect.Field)1 HashSet (java.util.HashSet)1