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