新增测试用例: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:
parent
c8c05b6eda
commit
8cab5654b6
|
@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,4 +50,11 @@
|
||||||
z
|
z
|
||||||
);
|
);
|
||||||
</chain>
|
</chain>
|
||||||
|
|
||||||
|
<chain name="testBaseSwitch2">
|
||||||
|
THEN(
|
||||||
|
z,
|
||||||
|
SWITCH(e).to(d)
|
||||||
|
);
|
||||||
|
</chain>
|
||||||
</flow>
|
</flow>
|
Loading…
Reference in New Issue