From 3a541458ca168170806a50437133884d585d5120 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Fri, 10 May 2024 15:01:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=B1=BB=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyp-admin/pom.xml | 8 +++++++ .../test/java/com/hyp/HypApplicationTest.java | 23 ++++++++++++++++++ .../hyp/manager/ApplyInfoListManagerTest.java | 24 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 hyp-admin/src/test/java/com/hyp/HypApplicationTest.java create mode 100644 hyp-admin/src/test/java/com/hyp/manager/ApplyInfoListManagerTest.java diff --git a/hyp-admin/pom.xml b/hyp-admin/pom.xml index 585e35a..10c1199 100644 --- a/hyp-admin/pom.xml +++ b/hyp-admin/pom.xml @@ -68,6 +68,14 @@ 2.1.0 + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/hyp-admin/src/test/java/com/hyp/HypApplicationTest.java b/hyp-admin/src/test/java/com/hyp/HypApplicationTest.java new file mode 100644 index 0000000..a1bcab0 --- /dev/null +++ b/hyp-admin/src/test/java/com/hyp/HypApplicationTest.java @@ -0,0 +1,23 @@ +package com.hyp; + + +import com.hyp.common.constant.HttpStatus; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.annotation.Rollback; +import org.springframework.transaction.annotation.Transactional; +import org.junit.jupiter.api.Assertions; + +@SpringBootTest +@Transactional(rollbackFor = Exception.class) +@Rollback +public class HypApplicationTest { + + + + @Test + public void test(){ + Assertions.assertEquals(200, HttpStatus.SUCCESS); + } + +} diff --git a/hyp-admin/src/test/java/com/hyp/manager/ApplyInfoListManagerTest.java b/hyp-admin/src/test/java/com/hyp/manager/ApplyInfoListManagerTest.java new file mode 100644 index 0000000..9f0a9d5 --- /dev/null +++ b/hyp-admin/src/test/java/com/hyp/manager/ApplyInfoListManagerTest.java @@ -0,0 +1,24 @@ +package com.hyp.manager; + +import com.hyp.HypApplicationTest; +import com.hyp.system.domain.vo.ApplyInfoListVO; +import com.hyp.web.controller.manager.ApplyInfoListManager; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; + + + class ApplyInfoListManagerTest extends HypApplicationTest { + + @Autowired + private ApplyInfoListManager applyInfoListManager; + + + @Test + void objectTest() { + ApplyInfoListVO detail = applyInfoListManager.detail("1c1e0cfeec36fa881d7cb8d82dd9d036"); + Assertions.assertNotNull(detail); + } + + +}