|  |  | 
 |  |  | package com.zy.asrs; | 
 |  |  |  | 
 |  |  |  | 
 |  |  | import com.zy.asrs.wms.WmsBoot; | 
 |  |  | import org.junit.Test; | 
 |  |  | import org.junit.runner.RunWith; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.boot.test.context.SpringBootTest; | 
 |  |  | import org.springframework.test.context.junit4.SpringRunner; | 
 |  |  |  | 
 |  |  | @RunWith(SpringRunner.class) | 
 |  |  | @SpringBootTest(classes = WmsBoot.class)//1、表明当前单元测试是运行在Spring Boot环境中的 | 
 |  |  | public class OrderEventTest { | 
 |  |  |  | 
 |  |  | //    @Autowired | 
 |  |  | //    private TestController testController; | 
 |  |  | // | 
 |  |  | // | 
 |  |  | //    @Test | 
 |  |  | //    public void testItem() { | 
 |  |  | //        testController.publishCustomEvent("123212323"); | 
 |  |  | //    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | package com.zy.asrs;
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | import com.zy.asrs.wms.WmsBoot;
 | 
 |  |  | import org.junit.Test;
 | 
 |  |  | import org.junit.runner.RunWith;
 | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
 |  |  | import org.springframework.boot.test.context.SpringBootTest;
 | 
 |  |  | import org.springframework.test.context.junit4.SpringRunner;
 | 
 |  |  | 
 | 
 |  |  | @RunWith(SpringRunner.class)
 | 
 |  |  | @SpringBootTest(classes = WmsBoot.class)//1、表明当前单元测试是运行在Spring Boot环境中的
 | 
 |  |  | public class OrderEventTest {
 | 
 |  |  | 
 | 
 |  |  | //    @Autowired
 | 
 |  |  | //    private TestController testController;
 | 
 |  |  | //
 | 
 |  |  | //
 | 
 |  |  | //    @Test
 | 
 |  |  | //    public void testItem() {
 | 
 |  |  | //        testController.publishCustomEvent("123212323");
 | 
 |  |  | //    }
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | } |