From 7764f42c90857c7769315124fcd2f18226576cb3 Mon Sep 17 00:00:00 2001 From: Leonhardt92 Date: Sun, 22 Jul 2018 14:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AE=8C=E6=95=B4=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dept/service/DeptServiceImplTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/com/ruoyi/project/system/dept/service/DeptServiceImplTest.java b/src/test/java/com/ruoyi/project/system/dept/service/DeptServiceImplTest.java index eaad4c981..99af3eac2 100644 --- a/src/test/java/com/ruoyi/project/system/dept/service/DeptServiceImplTest.java +++ b/src/test/java/com/ruoyi/project/system/dept/service/DeptServiceImplTest.java @@ -1,6 +1,7 @@ package com.ruoyi.project.system.dept.service; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; 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.test.context.junit4.SpringJUnit4ClassRunner; +import java.util.List; +import java.util.Map; + /** * DeptServiceImpl Tester. * @@ -44,6 +48,7 @@ public class DeptServiceImplTest { @Test public void testSelectDeptAll() throws Exception { //TODO: Test goes here... + Assert.assertEquals(deptService.selectDeptAll().size(), 10); } /** @@ -52,6 +57,9 @@ public class DeptServiceImplTest { @Test public void testSelectDeptTree() throws Exception { //TODO: Test goes here... + List> trees = deptService.selectDeptTree(); + trees.stream() + .forEach(tree -> System.out.println(tree)); } /** @@ -60,6 +68,7 @@ public class DeptServiceImplTest { @Test public void testSelectDeptCount() throws Exception { //TODO: Test goes here... + Assert.assertEquals(10, deptService.selectDeptCount(0L)); } /** @@ -92,6 +101,7 @@ public class DeptServiceImplTest { @Test public void testSelectDeptById() throws Exception { //TODO: Test goes here... + Assert.assertNotNull("若依集团不存在", deptService.selectDeptById(100L)); } /**