Search in sources :

Example 1 with RuntimeReferenceContext

use of pcgen.rules.context.RuntimeReferenceContext 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 };
}
Also used : ChangeProf(pcgen.cdom.content.ChangeProf) CDOMObject(pcgen.cdom.base.CDOMObject) Race(pcgen.core.Race) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) PCTemplate(pcgen.core.PCTemplate) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 2 with RuntimeReferenceContext

use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.

the class AppliedBonusFacetTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    addBonus(Combat.class);
}
Also used : ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 3 with RuntimeReferenceContext

use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.

the class RequiredTokenTest 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();
}
Also used : FactDefinition(pcgen.cdom.content.fact.FactDefinition) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) URI(java.net.URI) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 4 with RuntimeReferenceContext

use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.

the class SelectableTokenTest 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();
}
Also used : FactDefinition(pcgen.cdom.content.fact.FactDefinition) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) URI(java.net.URI) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Example 5 with RuntimeReferenceContext

use of pcgen.rules.context.RuntimeReferenceContext in project pcgen by PCGen.

the class FactSetDefTokenTest method resetContext.

protected void resetContext() {
    URI testURI = testCampaign.getURI();
    context = new RuntimeLoadContext(new RuntimeReferenceContext(), new ConsolidatedListCommitStrategy());
    context.setSourceURI(testURI);
    context.setExtractURI(testURI);
    fd = new FactSetDefinition();
}
Also used : FactSetDefinition(pcgen.cdom.content.factset.FactSetDefinition) ConsolidatedListCommitStrategy(pcgen.rules.context.ConsolidatedListCommitStrategy) RuntimeReferenceContext(pcgen.rules.context.RuntimeReferenceContext) URI(java.net.URI) RuntimeLoadContext(pcgen.rules.context.RuntimeLoadContext)

Aggregations

ConsolidatedListCommitStrategy (pcgen.rules.context.ConsolidatedListCommitStrategy)23 RuntimeLoadContext (pcgen.rules.context.RuntimeLoadContext)23 RuntimeReferenceContext (pcgen.rules.context.RuntimeReferenceContext)23 URI (java.net.URI)14 FactDefinition (pcgen.cdom.content.fact.FactDefinition)8 Before (org.junit.Before)4 Test (org.junit.Test)2 FormulaSemantics (pcgen.base.formula.base.FormulaSemantics)2 LegalScope (pcgen.base.formula.base.LegalScope)2 ScopeInstance (pcgen.base.formula.base.ScopeInstance)2 VariableID (pcgen.base.formula.base.VariableID)2 VariableLibrary (pcgen.base.formula.base.VariableLibrary)2 SimpleNode (pcgen.base.formula.parse.SimpleNode)2 ReconstructionVisitor (pcgen.base.formula.visitor.ReconstructionVisitor)2 SemanticsVisitor (pcgen.base.formula.visitor.SemanticsVisitor)2 UserFunction (pcgen.cdom.content.UserFunction)2 Equipment (pcgen.core.Equipment)2 LoadContext (pcgen.rules.context.LoadContext)2 IndividualSetup (pcgen.base.solver.IndividualSetup)1 CDOMObject (pcgen.cdom.base.CDOMObject)1