Search in sources :

Example 1 with GivePercentageTestFunction

use of com.dexels.navajo.expression.compiled.GivePercentageTestFunction in project navajo by Dexels.

the class TestCompiledPercentageExpression method setup.

@Before
public void setup() {
    FunctionInterface giveLongFunction = new GiveLongTestFunction();
    FunctionDefinition fd = new FunctionDefinition(giveLongFunction.getClass().getName(), "description", "input", "result");
    FunctionFactoryFactory.getInstance().addExplicitFunctionDefinition("ToLong", fd);
    FunctionInterface givePercentageFunction = new GivePercentageTestFunction();
    fd = new FunctionDefinition(givePercentageFunction.getClass().getName(), "description", "input", "result");
    FunctionFactoryFactory.getInstance().addExplicitFunctionDefinition("ToPercentage", fd);
}
Also used : FunctionInterface(com.dexels.navajo.expression.api.FunctionInterface) FunctionDefinition(com.dexels.navajo.expression.api.FunctionDefinition) GiveLongTestFunction(com.dexels.navajo.expression.compiled.GiveLongTestFunction) GivePercentageTestFunction(com.dexels.navajo.expression.compiled.GivePercentageTestFunction) Before(org.junit.Before)

Aggregations

FunctionDefinition (com.dexels.navajo.expression.api.FunctionDefinition)1 FunctionInterface (com.dexels.navajo.expression.api.FunctionInterface)1 GiveLongTestFunction (com.dexels.navajo.expression.compiled.GiveLongTestFunction)1 GivePercentageTestFunction (com.dexels.navajo.expression.compiled.GivePercentageTestFunction)1 Before (org.junit.Before)1