Search in sources :

Example 21 with ManagerFactory

use of pcgen.base.formula.base.ManagerFactory in project pcgen by PCGen.

the class SetNumberModifierTest method testInvalidConstruction.

@Test
public void testInvalidConstruction() {
    try {
        SetModifierFactory m = new SetModifierFactory();
        m.getModifier(100, null, new ManagerFactory() {
        }, null, null, null);
        fail("Expected SetModifier with null set value to fail");
    } catch (IllegalArgumentException | NullPointerException e) {
    //Yep!
    }
}
Also used : ManagerFactory(pcgen.base.formula.base.ManagerFactory) Test(org.junit.Test)

Aggregations

ManagerFactory (pcgen.base.formula.base.ManagerFactory)21 Test (org.junit.Test)20 ModifierFactory (pcgen.rules.persistence.token.ModifierFactory)8 PCGenModifier (pcgen.base.calculation.PCGenModifier)3 CalculationModifier (pcgen.base.calculation.CalculationModifier)2 NEPCalculation (pcgen.base.calculation.NEPCalculation)2 ScopeInstance (pcgen.base.formula.base.ScopeInstance)2 VariableID (pcgen.base.formula.base.VariableID)2 ProcessCalculation (pcgen.cdom.content.ProcessCalculation)2 Equipment (pcgen.core.Equipment)2 Before (org.junit.Before)1 EvaluationManager (pcgen.base.formula.base.EvaluationManager)1 FunctionLibrary (pcgen.base.formula.base.FunctionLibrary)1 LegalScope (pcgen.base.formula.base.LegalScope)1 LegalScopeLibrary (pcgen.base.formula.base.LegalScopeLibrary)1 OperatorLibrary (pcgen.base.formula.base.OperatorLibrary)1 VariableLibrary (pcgen.base.formula.base.VariableLibrary)1 ScopeInstanceFactory (pcgen.base.formula.inst.ScopeInstanceFactory)1 SimpleFormulaManager (pcgen.base.formula.inst.SimpleFormulaManager)1 SimpleFunctionLibrary (pcgen.base.formula.inst.SimpleFunctionLibrary)1