代码调整

This commit is contained in:
2023-03-16 10:05:53 +08:00
parent 3a1ea6f388
commit 93228bf1ec
10 changed files with 160 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
package com.njcn;
import com.njcn.prepare.PrepareApplication;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
/**
* @author hongawen
* @version 1.0.0
* @date 2021年12月10日 15:05
*/
@RunWith(SpringRunner.class)
@WebAppConfiguration
@SpringBootTest(classes = PrepareApplication.class)
public class BaseJunitTest {
}

View File

@@ -0,0 +1,42 @@
package com.njcn;
import com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpPassRateDPO;
import com.njcn.prepare.harmonic.service.mysql.line.RMpPassRateDService;
import com.njcn.prepare.harmonic.service.mysql.process.PmsTerminalDetectionService;
import com.njcn.process.pojo.po.PmsTerminalDetection;
import lombok.SneakyThrows;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2021年12月14日 12:55
*/
public class DemoTest extends BaseJunitTest {
@Autowired
private RMpPassRateDService rMpPassRateDService;
@Autowired
private PmsTerminalDetectionService pmsTerminalDetectionService;
@SneakyThrows
@Test
public void test() {
//查询pms库
List<RMpPassRateDPO> list1 = rMpPassRateDService.list();
//测试方法注解技术监督库
List<RMpPassRateDPO> list2 = rMpPassRateDService.getAll();
//测试service类注解技术监督库
List<PmsTerminalDetection> list = pmsTerminalDetectionService.list();
System.out.println("hello");
}
}