Search in sources :

Example 1 with GiveMoneyTestFunction

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

the class TestCompiledMoneyExpression 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 giveMoneyFunction = new GiveMoneyTestFunction();
    fd = new FunctionDefinition(giveMoneyFunction.getClass().getName(), "description", "input", "result");
    FunctionFactoryFactory.getInstance().addExplicitFunctionDefinition("ToMoney", fd);
}
Also used : FunctionInterface(com.dexels.navajo.expression.api.FunctionInterface) GiveMoneyTestFunction(com.dexels.navajo.expression.compiled.GiveMoneyTestFunction) FunctionDefinition(com.dexels.navajo.expression.api.FunctionDefinition) GiveLongTestFunction(com.dexels.navajo.expression.compiled.GiveLongTestFunction) 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 GiveMoneyTestFunction (com.dexels.navajo.expression.compiled.GiveMoneyTestFunction)1 Before (org.junit.Before)1