JeecgBoot 2.4.2 积木报表版本发布(注释掉可以不用的测试类)

pull/2246/head
zhangdaiscott 4 years ago
parent 4437c749ca
commit e46b653bc4

@ -1,65 +1,65 @@
package org.jeecg; //package org.jeecg;
//
import org.jeecg.modules.demo.mock.MockController; //import org.jeecg.modules.demo.mock.MockController;
import org.jeecg.modules.demo.test.entity.JeecgDemo; //import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper; //import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper;
import org.jeecg.modules.demo.test.service.IJeecgDemoService; //import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.junit.Assert; //import org.junit.Assert;
import org.junit.Test; //import org.junit.Test;
import org.junit.runner.RunWith; //import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
//
import javax.annotation.Resource; //import javax.annotation.Resource;
import java.util.List; //import java.util.List;
//
@RunWith(SpringRunner.class) //@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class) //@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class)
public class SampleTest { //public class SampleTest {
//
@Resource
private JeecgDemoMapper jeecgDemoMapper;
@Resource
private IJeecgDemoService jeecgDemoService;
// @Resource // @Resource
// private ISysDataLogService sysDataLogService; // private JeecgDemoMapper jeecgDemoMapper;
@Resource // @Resource
private MockController mock; // private IJeecgDemoService jeecgDemoService;
//// @Resource
@Test //// private ISysDataLogService sysDataLogService;
public void testSelect() { // @Resource
System.out.println(("----- selectAll method test ------")); // private MockController mock;
List<JeecgDemo> userList = jeecgDemoMapper.selectList(null); //
Assert.assertEquals(5, userList.size()); // @Test
userList.forEach(System.out::println); // public void testSelect() {
} // System.out.println(("----- selectAll method test ------"));
// List<JeecgDemo> userList = jeecgDemoMapper.selectList(null);
@Test // Assert.assertEquals(5, userList.size());
public void testXmlSql() { // userList.forEach(System.out::println);
System.out.println(("----- selectAll method test ------")); // }
List<JeecgDemo> userList = jeecgDemoMapper.getDemoByName("Sandy12"); //
userList.forEach(System.out::println);
}
/**
*
*/
@Test
public void testTran() {
jeecgDemoService.testTran();
}
//author:lvdandan-----date20190315---for:添加数据日志测试----
/**
*
*/
// @Test // @Test
// public void testDataLogSave() { // public void testXmlSql() {
// System.out.println(("----- datalog test ------")); // System.out.println(("----- selectAll method test ------"));
// String tableName = "jeecg_demo"; // List<JeecgDemo> userList = jeecgDemoMapper.getDemoByName("Sandy12");
// String dataId = "4028ef81550c1a7901550c1cd6e70001"; // userList.forEach(System.out::println);
// String dataContent = mock.sysDataLogJson(); // }
// sysDataLogService.addDataLog(tableName, dataId, dataContent); //
// /**
// * 测试事务
// */
// @Test
// public void testTran() {
// jeecgDemoService.testTran();
// }
//
// //author:lvdandan-----date20190315---for:添加数据日志测试----
// /**
// * 测试数据日志添加
// */
//// @Test
//// public void testDataLogSave() {
//// System.out.println(("----- datalog test ------"));
//// String tableName = "jeecg_demo";
//// String dataId = "4028ef81550c1a7901550c1cd6e70001";
//// String dataContent = mock.sysDataLogJson();
//// sysDataLogService.addDataLog(tableName, dataId, dataContent);
//// }
// //author:lvdandan-----date20190315---for:添加数据日志测试----
//} //}
//author:lvdandan-----date20190315---for:添加数据日志测试----
}

Loading…
Cancel
Save