mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
test #I7SVZF 完善XML格式测试用例
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flow>
|
||||
<chain id="implB" extends="base2">
|
||||
{3}=THEN(a,b);
|
||||
{4}=j;
|
||||
</chain>
|
||||
|
||||
<chain id="implC" extends="base2">
|
||||
{3}=THEN(a,b);
|
||||
{4}=THEN(a,b).id("j");
|
||||
</chain>
|
||||
|
||||
<chain abstract="true" id="base">
|
||||
THEN(a, b, {0}, {1})
|
||||
</chain>
|
||||
@@ -8,4 +18,11 @@
|
||||
{0}=IF(c, d, e);
|
||||
{1}=SWITCH(f).to(j,k);
|
||||
</chain>
|
||||
|
||||
<chain abstract="true" id="base2" extends="base">
|
||||
{0}=THEN(a,b,{3});
|
||||
{1}=SWITCH(f).to({4},k);
|
||||
</chain>
|
||||
|
||||
|
||||
</flow>
|
||||
Reference in New Issue
Block a user