From b56dd740e66943c06f0b0bb6e9f2980ca61facc3 Mon Sep 17 00:00:00 2001 From: 0007 <0007@qq.com> Date: Wed, 27 Aug 2025 19:58:06 +0800 Subject: [PATCH] Add File --- .../chain/node/QLExpressRouterNodeTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 agents-flex-chain/agents-flex-chain-qlexpress/src/test/java/com/agentsflex/chain/node/QLExpressRouterNodeTest.java 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); + } +}