mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
补充测试用例
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.yomahub.liteflow.test.emptyflow;
|
||||
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.property.LiteflowConfig;
|
||||
import com.yomahub.liteflow.test.BaseTest;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* 切面场景单元测试
|
||||
* @author Bryan.Zhang
|
||||
*/
|
||||
public class EmptyFlowTest extends BaseTest {
|
||||
|
||||
private static FlowExecutor flowExecutor;
|
||||
|
||||
@BeforeClass
|
||||
public static void init(){
|
||||
LiteflowConfig config = new LiteflowConfig();
|
||||
config.setRuleSource("emptyflow/flow.xml");
|
||||
flowExecutor = FlowExecutor.loadInstance(config);
|
||||
}
|
||||
|
||||
//测试空flow的情况下,liteflow是否能正常启动
|
||||
@Test
|
||||
public void testEmptyFlow() {
|
||||
//不做任何事,为的是能正常启动
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
package com.yomahub.liteflow.test.emptyflow;
|
||||
|
||||
import com.yomahub.liteflow.core.FlowExecutor;
|
||||
import com.yomahub.liteflow.entity.data.DefaultSlot;
|
||||
import com.yomahub.liteflow.entity.data.LiteflowResponse;
|
||||
import com.yomahub.liteflow.test.BaseTest;
|
||||
import com.yomahub.liteflow.test.aop.aspect.CustomAspect;
|
||||
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.context.annotation.Import;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
@@ -23,10 +19,10 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@TestPropertySource(value = "classpath:/emptyFlow/application.properties")
|
||||
@SpringBootTest(classes = EmptyFlowTest.class)
|
||||
@SpringBootTest(classes = EmptyFlowSpringbootTest.class)
|
||||
@EnableAutoConfiguration
|
||||
@Import(CustomAspect.class)
|
||||
public class EmptyFlowTest extends BaseTest {
|
||||
public class EmptyFlowSpringbootTest extends BaseTest {
|
||||
|
||||
@Resource
|
||||
private FlowExecutor flowExecutor;
|
||||
@@ -15,7 +15,7 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@ContextConfiguration("classpath:/emptyFlow/application.xml")
|
||||
public class EmptyFlowTest extends BaseTest {
|
||||
public class EmptyFlowSpringTest extends BaseTest {
|
||||
|
||||
@Resource
|
||||
private FlowExecutor flowExecutor;
|
||||
Reference in New Issue
Block a user