更新测试用例

This commit is contained in:
bryan31
2021-10-15 13:51:19 +08:00
parent a0d351c766
commit 3cac4ea64e
3 changed files with 22 additions and 3 deletions

View File

@@ -42,12 +42,17 @@ public class BaseConditionFlowTest extends BaseTest {
* 验证了默认参数情况下 when可以加载执行
* **/
@Test
public void testBaseConditionFlow() {
public void testBaseConditionFlow1() {
LiteflowResponse<DefaultSlot> response = flowExecutor.execute2Resp("chain1", "it's a base request");
Assert.assertTrue(response.isSuccess());
System.out.println(response.getSlot().printStep());
}
@Test
public void testBaseConditionFlow2() {
LiteflowResponse<DefaultSlot> response = flowExecutor.execute2Resp("chain2", "it's a base request");
}
/*****
* 标准chain
* 验证多层when 相同组 会合并node

View File

@@ -0,0 +1,15 @@
package com.yomahub.liteflow.test.condition.cmp1;
import com.yomahub.liteflow.core.NodeCondComponent;
import org.springframework.stereotype.Component;
@Component("j")
public class JCmp extends NodeCondComponent {
@Override
public String processCond() throws Exception {
System.out.println("Jcomp executed!");
return "chain3";
}
}

View File

@@ -7,8 +7,7 @@
<then value="chain2"/>
</chain>
<chain name="chain2">
<then value="b,a"/>
<then value="chain3"/>
<then value="b,j(a|chain3)"/>
</chain>
<chain name="chain3">