diff --git a/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringTest.java b/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringTest.java new file mode 100644 index 000000000..f08974c1e --- /dev/null +++ b/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringTest.java @@ -0,0 +1,33 @@ +package com.yomahub.liteflow.test.parsecustom; + +import com.yomahub.liteflow.core.FlowExecutor; +import com.yomahub.liteflow.entity.data.LiteflowResponse; +import com.yomahub.liteflow.entity.data.Slot; +import com.yomahub.liteflow.test.BaseTest; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.annotation.Resource; + +/** + * spring环境的自定义json parser单元测试 + * @author dongguo.tao + * @since 2.5.0 + */ +@RunWith(SpringRunner.class) +@ContextConfiguration("classpath:/parsecustom/application.xml") +public class CustomParserJsonSpringTest extends BaseTest { + + @Resource + private FlowExecutor flowExecutor; + + //测试spring场景的自定义json parser + @Test + public void testSpringboot() throws Exception{ + LiteflowResponse response = flowExecutor.execute("chain1", "args"); + Assert.assertTrue(response.isSuccess()); + } +} diff --git a/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringbootTest.java b/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringbootTest.java index 7e809ded6..99ad59116 100644 --- a/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringbootTest.java +++ b/liteflow-spring-boot-starter/src/test/java/com/yomahub/liteflow/test/parsecustom/CustomParserJsonSpringbootTest.java @@ -17,6 +17,7 @@ import javax.annotation.Resource; /** * springboot环境的自定义json parser单元测试 + * @author dongguo.tao * @since 2.5.0 */ @RunWith(SpringRunner.class) diff --git a/liteflow-spring-boot-starter/src/test/resources/parsecustom/application.xml b/liteflow-spring-boot-starter/src/test/resources/parsecustom/application.xml new file mode 100644 index 000000000..904c8c80b --- /dev/null +++ b/liteflow-spring-boot-starter/src/test/resources/parsecustom/application.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file