mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
加入fallback的一个测试用例
This commit is contained in:
@@ -19,6 +19,12 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.yomahub</groupId>
|
||||||
|
<artifactId>liteflow-el-builder</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.yomahub.liteflow.test.fallback;
|
package com.yomahub.liteflow.test.fallback;
|
||||||
|
|
||||||
|
import com.yomahub.liteflow.builder.el.ELBus;
|
||||||
|
import com.yomahub.liteflow.builder.el.ELWrapper;
|
||||||
|
import com.yomahub.liteflow.builder.el.LiteFlowChainELBuilder;
|
||||||
import com.yomahub.liteflow.core.FlowExecutor;
|
import com.yomahub.liteflow.core.FlowExecutor;
|
||||||
import com.yomahub.liteflow.flow.LiteflowResponse;
|
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||||
import com.yomahub.liteflow.test.BaseTest;
|
import com.yomahub.liteflow.test.BaseTest;
|
||||||
@@ -222,4 +225,13 @@ public class FallbackELSpringbootTest extends BaseTest {
|
|||||||
String stepStr2 = response2.getExecuteStepStrWithoutTime();
|
String stepStr2 = response2.getExecuteStepStrWithoutTime();
|
||||||
Assertions.assertTrue("c==>ifn2".equals(stepStr2) || "ifn2==>c".equals(stepStr2));
|
Assertions.assertTrue("c==>ifn2".equals(stepStr2) || "ifn2==>c".equals(stepStr2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testWithElBuild(){
|
||||||
|
ELWrapper el = ELBus.then("a", "b", "az");
|
||||||
|
LiteFlowChainELBuilder.createChain().setChainId("elBuilder").setEL(el.toEL()).build();
|
||||||
|
LiteflowResponse response = flowExecutor.execute2Resp("elBuilder");
|
||||||
|
Assertions.assertTrue(response.isSuccess());
|
||||||
|
Assertions.assertEquals("a==>b==>c", response.getExecuteStepStrWithoutTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user