测试用例调整getRequestData的获取方式

This commit is contained in:
bryan31
2022-06-03 01:17:10 +08:00
parent e2e3ef7c38
commit 0e9cb03141
32 changed files with 40 additions and 40 deletions

View File

@@ -20,7 +20,7 @@ public class ACmp{
@LiteflowMethod(LiteFlowMethodEnum.IS_ACCESS)
public boolean isAccess(NodeComponent bindCmp) {
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
if (Objects.nonNull(requestData) && requestData > 100){
return true;
}

View File

@@ -15,7 +15,7 @@ public class BCmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
public void process(NodeComponent bindCmp) {
System.out.println("BComp executed!");
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
Integer divisor = 130;
Integer result = divisor / requestData;
bindCmp.getSlot().setResponseData(result);
@@ -23,7 +23,7 @@ public class BCmp{
@LiteflowMethod(LiteFlowMethodEnum.IS_ACCESS)
public boolean isAccess(NodeComponent bindCmp) {
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
if (Objects.nonNull(requestData)){
return true;
}

View File

@@ -15,7 +15,7 @@ public class CCmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
public void process(NodeComponent bindCmp) {
System.out.println("CComp executed!");
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
Integer divisor = 130;
Integer result = divisor / requestData;
bindCmp.getSlot().setResponseData(result);
@@ -24,7 +24,7 @@ public class CCmp{
@LiteflowMethod(LiteFlowMethodEnum.IS_CONTINUE_ON_ERROR)
public boolean isContinueOnError(NodeComponent bindCmp) {
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
if (Objects.nonNull(requestData)){
return true;
}

View File

@@ -15,7 +15,7 @@ import java.util.Objects;
public class FCondCmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS_COND)
public String processCond(NodeComponent bindCmp) {
Integer requestData = bindCmp.getSlot().getRequestData();
Integer requestData = bindCmp.getRequestData();
if (Objects.isNull(requestData)){
return "d";
} else if(requestData == 0){

View File

@@ -24,7 +24,7 @@ public class ACmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
public void process(NodeComponent bindCmp) {
String str = bindCmp.getSlot().getRequestData();
String str = bindCmp.getRequestData();
if(StrUtil.isNotBlank(str) && str.equals("exception")) {
throw new RuntimeException("chain execute execption");
}

View File

@@ -24,7 +24,7 @@ public class BCmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
public void process(NodeComponent bindCmp) throws InterruptedException {
String str = bindCmp.getSlot().getRequestData();
String str = bindCmp.getRequestData();
if(StrUtil.isNotBlank(str) && str.equals("when")) {
try {
LOG.info("Bcomp sleep begin");

View File

@@ -21,7 +21,7 @@ public class ACmp{
@LiteflowMethod(LiteFlowMethodEnum.PROCESS)
public void process(NodeComponent bindCmp) {
String str = bindCmp.getSlot().getRequestData();
String str = bindCmp.getRequestData();
if(StrUtil.isNotBlank(str) && str.equals("exception")) {
throw new FlowSystemException("chain execute execption");
}