use of pcgen.base.formula.inst.SimpleVariableStore in project pcgen by PCGen.
the class SetNumberModifierTest method testGetFormulaModifier.
@Test
public void testGetFormulaModifier() {
SplitFormulaSetup setup = new SplitFormulaSetup();
setup.loadBuiltIns();
setup.getLegalScopeLibrary().registerScope(varScope);
IndividualSetup iSetup = new IndividualSetup(setup, "Global", new SimpleVariableStore());
SetModifierFactory factory = new SetModifierFactory();
Modifier<Number> modifier = factory.getModifier(35, "6+5", new ManagerFactory() {
}, iSetup.getFormulaManager(), varScope, numManager);
assertEquals((35L << 32) + factory.getInherentPriority(), modifier.getPriority());
assertSame(Number.class, modifier.getVariableFormat());
EvaluationManager evalManager = EvalManagerUtilities.getInputEM(4.3);
assertEquals(11, modifier.process(evalManager.getWith(EvaluationManager.FMANAGER, iSetup.getFormulaManager())));
}
Aggregations