diff --git a/agents-flex-chain/agents-flex-chain-qlexpress/src/test/java/com/agentsflex/chain/node/QLExpressRouterNodeTest.java b/agents-flex-chain/agents-flex-chain-qlexpress/src/test/java/com/agentsflex/chain/node/QLExpressRouterNodeTest.java new file mode 100644 index 0000000..1e48a6f --- /dev/null +++ b/agents-flex-chain/agents-flex-chain-qlexpress/src/test/java/com/agentsflex/chain/node/QLExpressRouterNodeTest.java @@ -0,0 +1,19 @@ +package com.agentsflex.chain.node; + +import com.ql.util.express.DefaultContext; +import com.ql.util.express.ExpressRunner; + +public class QLExpressRouterNodeTest { + + public static void main(String[] args) throws Exception { + String express = "if(default.contains(\"b\")){return \"end\"} else {return \"next\"}"; + + ExpressRunner runner = new ExpressRunner(); + DefaultContext context = new DefaultContext<>(); + context.put("default", "a"); + + Object result = runner.execute(express, context, null, true, false); + + System.out.println(result); + } +}