public static void init(ClipsShell shell) { FunctionHandlers handlers = FunctionHandlers.getInstance(); handlers.registerFunction(new PlusFunction()); handlers.registerFunction(new MinusFunction()); handlers.registerFunction(new MultiplyFunction()); handlers.registerFunction(new ModifyFunction()); handlers.registerFunction(new CreateListFunction()); handlers.registerFunction(new PrintoutFunction()); handlers.registerFunction(new PrognFunction()); handlers.registerFunction(new IfFunction()); handlers.registerFunction(new LessThanFunction()); handlers.registerFunction(new LessThanOrEqFunction()); handlers.registerFunction(new MoreThanFunction()); handlers.registerFunction(new MoreThanOrEqFunction()); handlers.registerFunction(new EqFunction()); handlers.registerFunction(new SwitchFunction()); // handlers.registerFunction( new DeffunctionFunction() ); handlers.registerFunction(new ReturnFunction()); handlers.registerFunction(new RunFunction()); handlers.registerFunction(new BindFunction()); handlers.registerFunction(new NewFunction()); handlers.registerFunction(new SetFunction()); handlers.registerFunction(new GetFunction()); handlers.registerFunction(new CallFunction()); handlers.registerFunction(new AssertFunction()); }
@Before public void setUp() { FunctionHandlers handlers = FunctionHandlers.getInstance(); handlers.registerFunction(new PlusFunction()); handlers.registerFunction(new MinusFunction()); handlers.registerFunction(new MultiplyFunction()); handlers.registerFunction(new ModifyFunction()); handlers.registerFunction(new CreateListFunction()); handlers.registerFunction(new PrintoutFunction()); handlers.registerFunction(new PrognFunction()); handlers.registerFunction(new IfFunction()); handlers.registerFunction(new LessThanFunction()); handlers.registerFunction(new LessThanOrEqFunction()); handlers.registerFunction(new MoreThanFunction()); handlers.registerFunction(new MoreThanOrEqFunction()); handlers.registerFunction(new EqFunction()); handlers.registerFunction(new SwitchFunction()); // handlers.registerFunction( new DeffunctionFunction() ); handlers.registerFunction(new ReturnFunction()); handlers.registerFunction(new RunFunction()); handlers.registerFunction(new BindFunction()); handlers.registerFunction(new NewFunction()); handlers.registerFunction(new SetFunction()); handlers.registerFunction(new GetFunction()); handlers.registerFunction(new CallFunction()); handlers.registerFunction(new AssertFunction()); this.shell = new ClipsShell(); this.baos = new ByteArrayOutputStream(); shell.addRouter("t", new PrintStream(baos)); }