mirror of https://gitee.com/y_project/RuoYi.git
提交完整的测试用例
parent
6fb6494223
commit
7764f42c90
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.project.system.dept.service;
|
package com.ruoyi.project.system.dept.service;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -9,6 +10,9 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeptServiceImpl Tester.
|
* DeptServiceImpl Tester.
|
||||||
*
|
*
|
||||||
|
@ -44,6 +48,7 @@ public class DeptServiceImplTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSelectDeptAll() throws Exception {
|
public void testSelectDeptAll() throws Exception {
|
||||||
//TODO: Test goes here...
|
//TODO: Test goes here...
|
||||||
|
Assert.assertEquals(deptService.selectDeptAll().size(), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,6 +57,9 @@ public class DeptServiceImplTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSelectDeptTree() throws Exception {
|
public void testSelectDeptTree() throws Exception {
|
||||||
//TODO: Test goes here...
|
//TODO: Test goes here...
|
||||||
|
List<Map<String, Object>> trees = deptService.selectDeptTree();
|
||||||
|
trees.stream()
|
||||||
|
.forEach(tree -> System.out.println(tree));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +68,7 @@ public class DeptServiceImplTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSelectDeptCount() throws Exception {
|
public void testSelectDeptCount() throws Exception {
|
||||||
//TODO: Test goes here...
|
//TODO: Test goes here...
|
||||||
|
Assert.assertEquals(10, deptService.selectDeptCount(0L));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,6 +101,7 @@ public class DeptServiceImplTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSelectDeptById() throws Exception {
|
public void testSelectDeptById() throws Exception {
|
||||||
//TODO: Test goes here...
|
//TODO: Test goes here...
|
||||||
|
Assert.assertNotNull("若依集团不存在", deptService.selectDeptById(100L));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue