mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
test #I7SVZF 添加新的测试用例,用于测试不同名称占位符是否有效
This commit is contained in:
@@ -48,4 +48,11 @@ public class AbstractChainJsonELTest extends BaseTest {
|
||||
Assertions.assertEquals("a==>b==>a==>b==>a==>b==>f==>a==>b", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test4() throws Exception {
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("implD", "arg");
|
||||
Assertions.assertTrue(response.isSuccess());
|
||||
Assertions.assertEquals("a==>b==>a==>b==>j==>k==>c==>d==>f==>j", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,4 +47,10 @@ public class AbstractChainXmlELTest extends BaseTest {
|
||||
Assertions.assertEquals("a==>b==>a==>b==>a==>b==>f==>a==>b", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test4() throws Exception {
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("implD", "arg");
|
||||
Assertions.assertTrue(response.isSuccess());
|
||||
Assertions.assertEquals("a==>b==>a==>b==>j==>k==>c==>d==>f==>j", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,4 +46,10 @@ public class AbstractChainYmlELTest extends BaseTest {
|
||||
Assertions.assertEquals("a==>b==>a==>b==>a==>b==>f==>a==>b", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test4() throws Exception {
|
||||
LiteflowResponse response = flowExecutor.execute2Resp("implD", "arg");
|
||||
Assertions.assertTrue(response.isSuccess());
|
||||
Assertions.assertEquals("a==>b==>a==>b==>j==>k==>c==>d==>f==>j", response.getExecuteStepStrWithoutTime());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,15 @@
|
||||
"extends": "base",
|
||||
"abstract": true,
|
||||
"value": "{0}=THEN(a,b,{3});\n {1}=SWITCH(f).to({4},k);"
|
||||
},
|
||||
{
|
||||
"id": "base3",
|
||||
"value": "THEN({_pre},{mainChain}, {subChain1},{subChain2},{end_chain});"
|
||||
},
|
||||
{
|
||||
"id": "implD",
|
||||
"extends": "base3",
|
||||
"value": "{_pre} = THEN(a,b);\n {mainChain}=THEN(a,b);\n{subChain1}=THEN(j,k);\n{subChain2}=IF(c, d, e);\n{end_chain}=SWITCH(f).to(j,k);"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -34,6 +34,16 @@
|
||||
{0}=THEN(a,b,{3});
|
||||
{1}=SWITCH(f).to({4},k);
|
||||
</chain>
|
||||
<chain name="base3">
|
||||
THEN({_pre},{mainChain}, {subChain1},{subChain2},{end_chain})
|
||||
</chain>
|
||||
|
||||
<chain extends="base3" id="implD">
|
||||
{_pre} = THEN(a,b);
|
||||
{mainChain}=THEN(a,b);
|
||||
{subChain1}=THEN(j,k);
|
||||
{subChain2}=IF(c, d, e);
|
||||
{end_chain}=SWITCH(f).to(j,k);
|
||||
</chain>
|
||||
|
||||
</flow>
|
||||
@@ -34,3 +34,9 @@ flow:
|
||||
extends: base
|
||||
abstract: true
|
||||
value: "{0}=THEN(a,b,{3});\n {1}=SWITCH(f).to({4},k);"
|
||||
- id: base3
|
||||
value: "THEN({_pre},{mainChain}, {subChain1},{subChain2},{end_chain})"
|
||||
- id: implD
|
||||
extends: base3
|
||||
value: "{_pre} = THEN(a,b);\n {mainChain}=THEN(a,b);\n{subChain1}=THEN(j,k);\n{subChain2}=IF(c, d, e);\n{end_chain}=SWITCH(f).to(j,k);"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user