use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AbstractPCClassLevelTokenTestCase method setUp.
@Override
@Before
public void setUp() throws PersistenceLayerException, URISyntaxException {
if (!classSetUpFired) {
classSetUp();
}
// Yea, this causes warnings...
TokenRegistration.register(getToken());
primaryContext = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
secondaryContext = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
primaryProf = primaryContext.getReferenceContext().constructCDOMObject(PCClass.class, "TestObj");
secondaryProf = secondaryContext.getReferenceContext().constructCDOMObject(PCClass.class, "TestObj");
primaryProf1 = primaryProf.getOriginalClassLevel(1);
primaryProf2 = primaryProf.getOriginalClassLevel(2);
primaryProf3 = primaryProf.getOriginalClassLevel(3);
secondaryProf1 = secondaryProf.getOriginalClassLevel(1);
secondaryProf2 = secondaryProf.getOriginalClassLevel(2);
secondaryProf3 = secondaryProf.getOriginalClassLevel(3);
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class SelectableTokenIntegrationTest method resetContext.
private void resetContext() {
URI testURI = testCampaign.getURI();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.setSourceURI(testURI);
context.setExtractURI(testURI);
cd = new FactDefinition();
cd.setDisplayName(PROP_1);
cd.setFormatManager(STRING_MGR);
cd.setName(PROP_1);
cd.setFactName(PROP_1);
cd.setUsableLocation(Domain.class);
cd.setVisibility(Visibility.DEFAULT);
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AbilityListTokenTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.getReferenceContext().importObject(AbilityCategory.FEAT);
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AddedBonusFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
addBonus(Combat.class);
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AbstractFormulaTestCase method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
setup = context.getVariableContext().getFormulaSetup();
setup.getSolverFactory().addSolverFormat(Number.class, getDMod(0));
setup.getSolverFactory().addSolverFormat(String.class, getDMod(""));
localSetup = new IndividualSetup(setup, "Global", new MonitorableVariableStore());
}
Aggregations