use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AbstractGlobalTokenTestCase method setUp.
@Override
@Before
public void setUp() throws PersistenceLayerException, URISyntaxException {
if (!classSetUpFired) {
classSetUp();
}
TokenRegistration.register(getToken());
primaryContext = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
secondaryContext = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
primaryProf = primaryContext.getReferenceContext().constructCDOMObject(getCDOMClass(), "TestObj");
secondaryProf = secondaryContext.getReferenceContext().constructCDOMObject(getCDOMClass(), "TestObj");
primaryContext.getReferenceContext().importObject(AbilityCategory.FEAT);
secondaryContext.getReferenceContext().importObject(AbilityCategory.FEAT);
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class AbstractKitTokenTestCase 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());
URI testURI = testCampaign.getURI();
primaryContext.setSourceURI(testURI);
primaryContext.setExtractURI(testURI);
secondaryContext.setSourceURI(testURI);
secondaryContext.setExtractURI(testURI);
primaryContext.getReferenceContext().importObject(AbilityCategory.FEAT);
secondaryContext.getReferenceContext().importObject(AbilityCategory.FEAT);
primaryProf = getSubInstance();
secondaryProf = getSubInstance();
expectedPrimaryMessageCount = 0;
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class TableLoaderTest method setUp.
@Before
public void setUp() throws Exception {
uri = new URI("file:/Test%20Case");
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
loader = new TableLoader();
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class DataTypeTokenTest method resetContext.
protected void resetContext() {
URI testURI = testCampaign.getURI();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.setSourceURI(testURI);
context.setExtractURI(testURI);
cd = new FactDefinition();
}
use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.
the class ExplanationTokenTest method resetContext.
protected void resetContext() {
URI testURI = testCampaign.getURI();
context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
context.setSourceURI(testURI);
context.setExtractURI(testURI);
cd = new FactDefinition();
}
Aggregations