use of pcgen.core.PCTemplate in project pcgen by PCGen.
the class HandsFacetTest method testGetFromTemplate.
@Test
public void testGetFromTemplate() {
rfacet.set(id, new Race());
PCTemplate t = new PCTemplate();
t.put(IntegerKey.CREATURE_HANDS, 5);
tfacet.add(id, t, this);
assertEquals(5, facet.getHands(id));
tfacet.remove(id, t, this);
assertEquals(2, facet.getHands(id));
}
use of pcgen.core.PCTemplate in project pcgen by PCGen.
the class HasAnyFavoredClassFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
CDOMObject cdo1 = new PCTemplate();
cdo1.setName("Templ");
CDOMObject cdo2 = new Race();
cdo2.setName("Race");
PCStat pcs1 = new PCStat();
pcs1.setName("Stat1");
PCStat pcs2 = new PCStat();
pcs2.setName("Stat2");
Boolean st1 = Boolean.TRUE;
Boolean st2 = Boolean.FALSE;
cdo1.put(ObjectKey.ANY_FAVORED_CLASS, st1);
cdo2.put(ObjectKey.ANY_FAVORED_CLASS, st2);
source = new CDOMObject[] { cdo1, cdo2 };
target = new Boolean[] { st1, st2 };
}
use of pcgen.core.PCTemplate in project pcgen by PCGen.
the class NaturalWeaponProfFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
CDOMObject cdo1 = new PCTemplate();
cdo1.setName("Template1");
CDOMObject cdo2 = new Race();
cdo2.setName("Race1");
WeaponProf st1 = new WeaponProf();
st1.setName("Prof1");
WeaponProf st2 = new WeaponProf();
st1.setName("Prof2");
cdo1.addToListFor(ListKey.IMPLIED_WEAPONPROF, CDOMDirectSingleRef.getRef(st1));
cdo2.addToListFor(ListKey.IMPLIED_WEAPONPROF, CDOMDirectSingleRef.getRef(st2));
source = new CDOMObject[] { cdo1, cdo2 };
target = new WeaponProf[] { st1, st2 };
}
use of pcgen.core.PCTemplate in project pcgen by PCGen.
the class ChangeProfFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
CDOMObject cdo1 = new PCTemplate();
cdo1.setName("Template1");
CDOMObject cdo2 = new Race();
cdo2.setName("Race1");
ChangeProf st1 = getObject();
ChangeProf st2 = getObject();
cdo1.addToListFor(ListKey.CHANGEPROF, st1);
cdo2.addToListFor(ListKey.CHANGEPROF, st2);
source = new CDOMObject[] { cdo1, cdo2 };
target = new ChangeProf[] { st1, st2 };
}
use of pcgen.core.PCTemplate in project pcgen by PCGen.
the class FavoredClassFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
CDOMObject cdo1 = new PCTemplate();
cdo1.setName("Template1");
CDOMObject cdo2 = new Race();
cdo2.setName("Race1");
PCClass st1 = new PCClass();
st1.setName("Prof1");
PCClass st2 = new PCClass();
st1.setName("Prof2");
cdo1.addToListFor(ListKey.FAVORED_CLASS, CDOMDirectSingleRef.getRef(st1));
cdo2.addToListFor(ListKey.FAVORED_CLASS, CDOMDirectSingleRef.getRef(st2));
source = new CDOMObject[] { cdo1, cdo2 };
target = new PCClass[] { st1, st2 };
}
Aggregations