|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
import com.example.demo.DemoApplication; |
|
|
|
|
import com.example.demo.service.INoticeService; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.junit.runner.RunWith; |
|
|
|
|
import org.springblade.core.test.BladeBootTest; |
|
|
|
|
import org.springblade.core.test.BladeSpringRunner; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -15,9 +17,13 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
@BladeBootTest(appName = "blade-demo", profile = "test", enableLoader = true) |
|
|
|
|
public class BladeDemoTest { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private INoticeService noticeService; |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void contextLoads() { |
|
|
|
|
System.out.println("测试~~~~~~"); |
|
|
|
|
int count = noticeService.count(); |
|
|
|
|
System.out.println("notice数量:[" + count + "] 个"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|