新增测试用例:switch to单个node时出错: (2022-07-12 switch 异常错误.c.y.l.builder.el.operator.ToOperator : parameter error;

run QlExpress Exception at line 1)
This commit is contained in:
mll 2022-07-12 18:11:44 +08:00
parent c8c05b6eda
commit 8cab5654b6
3 changed files with 53 additions and 0 deletions

View File

@ -62,4 +62,12 @@ public class BaseELSpringbootTest extends BaseTest {
LiteflowResponse response = flowExecutor.execute2Resp("chain5", "arg"); LiteflowResponse response = flowExecutor.execute2Resp("chain5", "arg");
Assert.assertTrue(response.isSuccess()); Assert.assertTrue(response.isSuccess());
} }
//2022-07-12 switch 异常错误.c.y.l.builder.el.operator.ToOperator : parameter error
//run QlExpress Exception at line 1 :
@Test
public void testBaseSwitch2() throws Exception{
LiteflowResponse response = flowExecutor.execute2Resp("testBaseSwitch2", "arg");
Assert.assertTrue(response.isSuccess());
}
} }

View File

@ -0,0 +1,38 @@
package com.yomahub.liteflow.test.base;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import com.yomahub.liteflow.test.BaseTest;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
/**
* springboot环境EL常规的例子测试
* @author Bryan.Zhang
*/
@RunWith(SpringRunner.class)
@TestPropertySource(value = "classpath:/base/application.properties")
@SpringBootTest(classes = BaseELSpringbootTest2.class)
@EnableAutoConfiguration
@ComponentScan({"com.yomahub.liteflow.test.base.cmp"})
public class BaseELSpringbootTest2 extends BaseTest {
@Resource
private FlowExecutor flowExecutor;
//最简单的情况
//2022-07-12 SWITCH 异常错误.[com.yomahub.liteflow.builder.el.operator.ToOperator.executeInner(45)] : The parameter must be Executable item!
@Test
public void testBase1() throws Exception{
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
Assert.assertTrue(response.isSuccess());
}
}

View File

@ -50,4 +50,11 @@
z z
); );
</chain> </chain>
<chain name="testBaseSwitch2">
THEN(
z,
SWITCH(e).to(d)
);
</chain>
</flow> </flow>