From bc7d998166a42977154a915f315a1e82c512b1ae Mon Sep 17 00:00:00 2001 From: zy <953725892@qq.com> Date: Tue, 19 Sep 2023 00:17:20 +0800 Subject: [PATCH] =?UTF-8?q?test=20#I7SVZF=20=E5=AE=8C=E5=96=84XML=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractChainXMLELSpringbootTest.java | 21 ++++++++++++++++++- .../test/resources/abstractChain/flow.el.xml | 17 +++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/abstractChain/AbstractChainXMLELSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/abstractChain/AbstractChainXMLELSpringbootTest.java index 9799ea12f..099436baf 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/abstractChain/AbstractChainXMLELSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/abstractChain/AbstractChainXMLELSpringbootTest.java @@ -26,11 +26,30 @@ public class AbstractChainXMLELSpringbootTest extends BaseTest { @Resource private FlowExecutor flowExecutor; - // XML文件单继承测试 + + + // XML文件基本继承测试 @Test public void test1() throws Exception { LiteflowResponse response = flowExecutor.execute2Resp("implA", "arg"); Assertions.assertTrue(response.isSuccess()); Assertions.assertEquals("a==>b==>c==>d==>f==>j", response.getExecuteStepStrWithoutTime()); } + + //测试嵌套继承的baseChain是否重复解析 + @Test + public void test2() throws Exception { + LiteflowResponse response = flowExecutor.execute2Resp("implB", "arg"); + Assertions.assertTrue(response.isSuccess()); + Assertions.assertEquals("a==>b==>a==>b==>a==>b==>f==>j", response.getExecuteStepStrWithoutTime()); + } + + //测试嵌套继承的baseChain是否重复解析 + @Test + public void test3() throws Exception { + LiteflowResponse response = flowExecutor.execute2Resp("implC", "arg"); + Assertions.assertTrue(response.isSuccess()); + Assertions.assertEquals("a==>b==>a==>b==>a==>b==>f==>a==>b", response.getExecuteStepStrWithoutTime()); + } + } diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/abstractChain/flow.el.xml b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/abstractChain/flow.el.xml index f647ed40e..2cfe33ef4 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/abstractChain/flow.el.xml +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/abstractChain/flow.el.xml @@ -1,5 +1,15 @@ + + {3}=THEN(a,b); + {4}=j; + + + + {3}=THEN(a,b); + {4}=THEN(a,b).id("j"); + + THEN(a, b, {0}, {1}) @@ -8,4 +18,11 @@ {0}=IF(c, d, e); {1}=SWITCH(f).to(j,k); + + + {0}=THEN(a,b,{3}); + {1}=SWITCH(f).to({4},k); + + + \ No newline at end of file