From 5e6e16a28e172c93b82ac1ea173186379419fc45 Mon Sep 17 00:00:00 2001 From: GiJung <101462387+GiJungPark@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:01:50 +0900 Subject: [PATCH 1/4] =?UTF-8?q?rename:=20=EC=9E=98=EB=AA=BB=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=EB=90=9C=20DisplayName=20=EB=B0=8F=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=20=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dmforu/crawling/parser/DepartmentNoticeParserTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dmforu-crawling/src/test/kotlin/com/dmforu/crawling/parser/DepartmentNoticeParserTest.kt b/dmforu-crawling/src/test/kotlin/com/dmforu/crawling/parser/DepartmentNoticeParserTest.kt index b326796..1e7edd5 100644 --- a/dmforu-crawling/src/test/kotlin/com/dmforu/crawling/parser/DepartmentNoticeParserTest.kt +++ b/dmforu-crawling/src/test/kotlin/com/dmforu/crawling/parser/DepartmentNoticeParserTest.kt @@ -25,7 +25,7 @@ class DepartmentNoticeParserTest { @InjectMocks private lateinit var parser: DepartmentNoticeParser - @DisplayName("") + @DisplayName("학과 공지사항 목록을 파싱할 수 있다.") @Test fun parse() { // given @@ -77,6 +77,7 @@ class DepartmentNoticeParserTest { } + @DisplayName("학과 공지사항 목록을 파싱할 때, 공지사항 주소가 잘못되어 있는 경우 예외를 발생시킨다.") @Test fun parseWhenUrlInvalid() { // given From 40e3a5bb348889144dda3db1e086291a389df9ac Mon Sep 17 00:00:00 2001 From: GiJung <101462387+GiJungPark@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:02:23 +0900 Subject: [PATCH 2/4] =?UTF-8?q?test:=20mysql=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dmforu/storage/db/mysql/MysqlIntegrationTest.kt | 11 +++++++++++ .../db/mysql/notice/NoticeEntityRepositoryTest.kt | 7 +++---- .../db/mysql/notice/NoticeJpaRepositoryTest.kt | 12 ++++++++---- .../mysql/subscribe/SubscribeEntityRepositoryTest.kt | 6 ++---- .../db/mysql/subscribe/SubscribeJpaRepositoryTest.kt | 11 ++++++++--- 5 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/MysqlIntegrationTest.kt diff --git a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/MysqlIntegrationTest.kt b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/MysqlIntegrationTest.kt new file mode 100644 index 0000000..041ebce --- /dev/null +++ b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/MysqlIntegrationTest.kt @@ -0,0 +1,11 @@ +package com.dmforu.storage.db.mysql + +import com.dmforu.storage.db.mysql.config.MysqlJpaConfig +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.context.annotation.Import +import org.springframework.test.context.ActiveProfiles + +@ActiveProfiles("test") +@SpringBootTest(classes = [MysqlApplicationTest::class]) +@Import(MysqlJpaConfig::class) +abstract class MysqlIntegrationTest {} \ No newline at end of file diff --git a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeEntityRepositoryTest.kt b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeEntityRepositoryTest.kt index 8001994..f79dd95 100644 --- a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeEntityRepositoryTest.kt +++ b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeEntityRepositoryTest.kt @@ -2,6 +2,7 @@ package com.dmforu.storage.db.mysql.notice import com.dmforu.domain.notice.Notice import com.dmforu.storage.db.mysql.MysqlApplicationTest +import com.dmforu.storage.db.mysql.MysqlIntegrationTest import com.dmforu.storage.db.mysql.config.MysqlJpaConfig import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.tuple @@ -14,10 +15,8 @@ import org.springframework.context.annotation.Import import org.springframework.test.context.ActiveProfiles import java.time.LocalDate -@ActiveProfiles("test") -@SpringBootTest(classes = [MysqlApplicationTest::class]) -@Import(MysqlJpaConfig::class) -class NoticeEntityRepositoryTest { + +class NoticeEntityRepositoryTest : MysqlIntegrationTest() { @Autowired private lateinit var noticeRepository: NoticeJpaRepository diff --git a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeJpaRepositoryTest.kt b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeJpaRepositoryTest.kt index 2f2e4c5..dc37ccd 100644 --- a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeJpaRepositoryTest.kt +++ b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/notice/NoticeJpaRepositoryTest.kt @@ -1,9 +1,11 @@ package com.dmforu.storage.db.mysql.notice import com.dmforu.domain.notice.Notice +import com.dmforu.storage.db.mysql.MysqlIntegrationTest import com.dmforu.storage.db.mysql.config.MysqlJpaConfig import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.tuple +import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired @@ -14,10 +16,12 @@ import org.springframework.data.domain.Sort import org.springframework.test.context.ActiveProfiles import java.time.LocalDate -@ActiveProfiles("test") -@DataJpaTest -@Import(MysqlJpaConfig::class) -class NoticeJpaRepositoryTest { +class NoticeJpaRepositoryTest : MysqlIntegrationTest() { + + @AfterEach + fun tearDown() { + noticeRepository.deleteAllInBatch() + } @Autowired private lateinit var noticeRepository: NoticeJpaRepository diff --git a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeEntityRepositoryTest.kt b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeEntityRepositoryTest.kt index 6c05a9a..8ac418a 100644 --- a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeEntityRepositoryTest.kt +++ b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeEntityRepositoryTest.kt @@ -3,6 +3,7 @@ package com.dmforu.storage.db.mysql.subscribe import com.dmforu.domain.subscribe.Subscribe import com.dmforu.storage.db.mysql.config.MysqlJpaConfig import com.dmforu.storage.db.mysql.MysqlApplicationTest +import com.dmforu.storage.db.mysql.MysqlIntegrationTest import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.tuple import org.junit.jupiter.api.AfterEach @@ -13,10 +14,7 @@ import org.springframework.boot.test.context.SpringBootTest import org.springframework.context.annotation.Import import org.springframework.test.context.ActiveProfiles -@ActiveProfiles("test") -@SpringBootTest(classes = [MysqlApplicationTest::class]) -@Import(MysqlJpaConfig::class) -class SubscribeEntityRepositoryTest { +class SubscribeEntityRepositoryTest : MysqlIntegrationTest(){ @Autowired private lateinit var subscribeRepository: SubscribeJpaRepository diff --git a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeJpaRepositoryTest.kt b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeJpaRepositoryTest.kt index 1da9b9f..ded7f60 100644 --- a/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeJpaRepositoryTest.kt +++ b/dmforu-infrastructure/storage/mysql/src/test/kotlin/com/dmforu/storage/db/mysql/subscribe/SubscribeJpaRepositoryTest.kt @@ -1,19 +1,24 @@ package com.dmforu.storage.db.mysql.subscribe import com.dmforu.domain.subscribe.Subscribe +import com.dmforu.storage.db.mysql.MysqlIntegrationTest import com.dmforu.storage.db.mysql.config.MysqlJpaConfig import com.dmforu.storage.db.mysql.subscribe.SubscribeEntity import com.dmforu.storage.db.mysql.subscribe.SubscribeJpaRepository import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest import org.springframework.context.annotation.Import -@DataJpaTest -@Import(MysqlJpaConfig::class) -class SubscribeJpaRepositoryTest { +class SubscribeJpaRepositoryTest : MysqlIntegrationTest() { + + @AfterEach + fun tearDown() { + subscribeRepository.deleteAllInBatch() + } @Autowired private lateinit var subscribeRepository: SubscribeJpaRepository From 8b2e606f98039cbb9002ec4a3df0ef50cc4f8391 Mon Sep 17 00:00:00 2001 From: GiJung <101462387+GiJungPark@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:02:52 +0900 Subject: [PATCH 3/4] =?UTF-8?q?test:=20mock=20=EC=88=98=EB=8F=99=20?= =?UTF-8?q?=EC=A3=BC=EC=9E=85=EC=97=90=EC=84=9C=20=EC=95=A0=EB=84=88?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EC=85=98=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dmforu/fcm/FirebaseMessageSenderTest.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dmforu-infrastructure/fcm/src/test/kotlin/com/dmforu/fcm/FirebaseMessageSenderTest.kt b/dmforu-infrastructure/fcm/src/test/kotlin/com/dmforu/fcm/FirebaseMessageSenderTest.kt index 1754866..5d095a6 100644 --- a/dmforu-infrastructure/fcm/src/test/kotlin/com/dmforu/fcm/FirebaseMessageSenderTest.kt +++ b/dmforu-infrastructure/fcm/src/test/kotlin/com/dmforu/fcm/FirebaseMessageSenderTest.kt @@ -7,25 +7,26 @@ import com.google.firebase.messaging.MulticastMessage import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test +import org.junit.jupiter.api.extension.ExtendWith +import org.mockito.InjectMocks +import org.mockito.Mock import org.mockito.Mockito.mock import org.mockito.Mockito.verify +import org.mockito.junit.jupiter.MockitoExtension import org.mockito.kotlin.any import org.mockito.kotlin.given import java.time.LocalDate +@ExtendWith(MockitoExtension::class) class FirebaseMessageSenderTest { + @Mock private lateinit var firebaseMessaging: FirebaseMessaging + @InjectMocks private lateinit var messageSender: FirebaseMessageSender - @BeforeEach - fun setUp() { - firebaseMessaging = mock() - messageSender = FirebaseMessageSender(firebaseMessaging) - } - @DisplayName("공지를 푸시 알림으로 전송한다.") @Test fun sendNoticeMessage() { From a9a899f3ea6b2dc2cf92527c5caf07e09707d613 Mon Sep 17 00:00:00 2001 From: GiJung <101462387+GiJungPark@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:10:32 +0900 Subject: [PATCH 4/4] =?UTF-8?q?test:=20api=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/old/OldSubscribeController.kt | 10 ++-- .../com/dmforu/api/ControllerTestSupport.kt | 14 +++++- .../dmforu/api/OldControllerTestSupport.kt | 47 ------------------- .../controller/old/OldDietControllerTest.kt | 4 +- .../controller/old/OldNoticeControllerTest.kt | 4 +- .../old/OldScheduleControllerTest.kt | 4 +- .../old/OldSubscribeControllerTest.kt | 6 +-- 7 files changed, 26 insertions(+), 63 deletions(-) delete mode 100644 dmforu-api/src/test/kotlin/com/dmforu/api/OldControllerTestSupport.kt diff --git a/dmforu-api/src/main/kotlin/com/dmforu/api/controller/old/OldSubscribeController.kt b/dmforu-api/src/main/kotlin/com/dmforu/api/controller/old/OldSubscribeController.kt index c919818..4576ae1 100644 --- a/dmforu-api/src/main/kotlin/com/dmforu/api/controller/old/OldSubscribeController.kt +++ b/dmforu-api/src/main/kotlin/com/dmforu/api/controller/old/OldSubscribeController.kt @@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController @RestController class OldSubscribeController( private val subscribeWriter: SubscribeWriter, - private val subscribeUpdater: OldSubscribeUpdater, + private val oldSubscribeUpdater: OldSubscribeUpdater, ) { @Operation(summary = "[구버전] 최초 Token 등록 API", description = "애플리케이션 최초 실행시 Token과 학과, 키워드를 등록한다.") @PostMapping("/token/v1/dmu/initToken") @@ -29,28 +29,28 @@ class OldSubscribeController( @Operation(summary = "[구버전] 학사 알림 구독", description = "학사 알림을 받도록 설정한다.") @PostMapping("/department/v1/dmu/updateDepartment") fun oldDepartmentSubscribe(@RequestBody departmentRequest: OldDepartmentRequest): ResponseEntity { - subscribeUpdater.subscribeDepartment(token = departmentRequest.token, department = departmentRequest.department) + oldSubscribeUpdater.subscribeDepartment(token = departmentRequest.token, department = departmentRequest.department) return ResponseEntity.ok().build() } @Operation(summary = "[구버전] 학사 알림 구독해제", description = "학사 알림을 받지 않도록 설정한다.") @PostMapping("/department/v1/dmu/deleteDepartment") fun oldDepartmentUnsubscribe(@RequestBody tokenRequest: OldTokenRequest): ResponseEntity { - subscribeUpdater.unsubscribeDepartment(token = tokenRequest.token) + oldSubscribeUpdater.unsubscribeDepartment(token = tokenRequest.token) return ResponseEntity.ok().build() } @Operation(summary = "[구버전] 키워드 알림 구독", description = "키워드 알림을 받도록 설정한다.") @PostMapping("/token/v1/dmu/updateTopic") fun oldKeywordsSubscribe(@RequestBody keywordsRequest: OldKeywordsSubscribeRequest): ResponseEntity { - subscribeUpdater.subscribeKeywords(token = keywordsRequest.token, keywords = keywordsRequest.topics) + oldSubscribeUpdater.subscribeKeywords(token = keywordsRequest.token, keywords = keywordsRequest.topics) return ResponseEntity.ok().build() } @Operation(summary = "[구버전] 키워드 알림 구독해제", description = "키워드 알림을 받지 않도록 설정한다.") @PostMapping("/token/v1/dmu/deleteTopic") fun oldKeywordsUnsubscribe(@RequestBody tokenRequest: OldTokenRequest): ResponseEntity { - subscribeUpdater.unsubscribeKeywords(token = tokenRequest.token) + oldSubscribeUpdater.unsubscribeKeywords(token = tokenRequest.token) return ResponseEntity.ok().build() } } \ No newline at end of file diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/ControllerTestSupport.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/ControllerTestSupport.kt index f774bcf..4f578c5 100644 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/ControllerTestSupport.kt +++ b/dmforu-api/src/test/kotlin/com/dmforu/api/ControllerTestSupport.kt @@ -1,5 +1,9 @@ package com.dmforu.api +import com.dmforu.api.controller.old.OldDietController +import com.dmforu.api.controller.old.OldNoticeController +import com.dmforu.api.controller.old.OldScheduleController +import com.dmforu.api.controller.old.OldSubscribeController import com.dmforu.api.controller.v1.DietController import com.dmforu.api.controller.v1.NoticeController import com.dmforu.api.controller.v1.ScheduleController @@ -7,6 +11,7 @@ import com.dmforu.api.controller.v1.SubscribeController import com.dmforu.domain.diet.DietReader import com.dmforu.domain.notice.NoticeReader import com.dmforu.domain.schedule.ScheduleReader +import com.dmforu.domain.subscribe.OldSubscribeUpdater import com.dmforu.domain.subscribe.SubscribeUpdater import com.dmforu.domain.subscribe.SubscribeWriter import com.fasterxml.jackson.databind.ObjectMapper @@ -15,7 +20,12 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest import org.springframework.boot.test.mock.mockito.MockBean import org.springframework.test.web.servlet.MockMvc -@WebMvcTest(controllers = [DietController::class, NoticeController::class, ScheduleController::class, SubscribeController::class]) +@WebMvcTest( + controllers = [ + DietController::class, NoticeController::class, ScheduleController::class, SubscribeController::class, + OldDietController::class, OldNoticeController::class, OldScheduleController::class, OldSubscribeController::class + ] +) abstract class ControllerTestSupport { @Autowired @@ -39,6 +49,8 @@ abstract class ControllerTestSupport { @MockBean protected lateinit var subscribeWriter: SubscribeWriter + @MockBean + protected lateinit var oldSubscribeUpdater: OldSubscribeUpdater } diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/OldControllerTestSupport.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/OldControllerTestSupport.kt deleted file mode 100644 index 91e8355..0000000 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/OldControllerTestSupport.kt +++ /dev/null @@ -1,47 +0,0 @@ -package com.dmforu.api - -import com.dmforu.api.controller.old.OldDietController -import com.dmforu.api.controller.old.OldNoticeController -import com.dmforu.api.controller.old.OldScheduleController -import com.dmforu.api.controller.old.OldSubscribeController -import com.dmforu.api.controller.v1.DietController -import com.dmforu.api.controller.v1.NoticeController -import com.dmforu.api.controller.v1.ScheduleController -import com.dmforu.api.controller.v1.SubscribeController -import com.dmforu.domain.diet.DietReader -import com.dmforu.domain.notice.NoticeReader -import com.dmforu.domain.schedule.ScheduleReader -import com.dmforu.domain.subscribe.OldSubscribeUpdater -import com.dmforu.domain.subscribe.SubscribeReader -import com.dmforu.domain.subscribe.SubscribeUpdater -import com.dmforu.domain.subscribe.SubscribeWriter -import com.fasterxml.jackson.databind.ObjectMapper -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest -import org.springframework.boot.test.mock.mockito.MockBean -import org.springframework.test.web.servlet.MockMvc - -@WebMvcTest(controllers = [OldDietController::class, OldNoticeController::class, OldScheduleController::class, OldSubscribeController::class]) -abstract class OldControllerTestSupport { - - @Autowired - protected lateinit var mockMvc: MockMvc - - @Autowired - protected lateinit var objectMapper: ObjectMapper - - @MockBean - protected lateinit var dietReader: DietReader - - @MockBean - protected lateinit var noticeReader: NoticeReader - - @MockBean - protected lateinit var scheduleReader: ScheduleReader - - @MockBean - protected lateinit var subscribeWriter: SubscribeWriter - - @MockBean - protected lateinit var subscribeUpdater: OldSubscribeUpdater -} diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldDietControllerTest.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldDietControllerTest.kt index f35a6aa..465bd4e 100644 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldDietControllerTest.kt +++ b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldDietControllerTest.kt @@ -1,6 +1,6 @@ package com.dmforu.api.controller.old -import com.dmforu.api.OldControllerTestSupport +import com.dmforu.api.ControllerTestSupport import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -9,7 +9,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -class OldDietControllerTest : OldControllerTestSupport() { +class OldDietControllerTest : ControllerTestSupport() { @DisplayName("식단을 불러온다.") @Test diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldNoticeControllerTest.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldNoticeControllerTest.kt index 3261fe7..90b0777 100644 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldNoticeControllerTest.kt +++ b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldNoticeControllerTest.kt @@ -1,6 +1,6 @@ package com.dmforu.api.controller.old -import com.dmforu.api.OldControllerTestSupport +import com.dmforu.api.ControllerTestSupport import com.dmforu.api.support.error.ErrorCode import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.DisplayName @@ -13,7 +13,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -class OldNoticeControllerTest : OldControllerTestSupport() { +class OldNoticeControllerTest : ControllerTestSupport() { @DisplayName("대학 공지를 불러온다.") @Test diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldScheduleControllerTest.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldScheduleControllerTest.kt index 6f155fe..4456435 100644 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldScheduleControllerTest.kt +++ b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldScheduleControllerTest.kt @@ -1,6 +1,6 @@ package com.dmforu.api.controller.old -import com.dmforu.api.OldControllerTestSupport +import com.dmforu.api.ControllerTestSupport import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -10,7 +10,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -class OldScheduleControllerTest : OldControllerTestSupport() { +class OldScheduleControllerTest : ControllerTestSupport() { @DisplayName("학사 일정을 불러온다.") @Test diff --git a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldSubscribeControllerTest.kt b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldSubscribeControllerTest.kt index d70f634..e9dfa6a 100644 --- a/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldSubscribeControllerTest.kt +++ b/dmforu-api/src/test/kotlin/com/dmforu/api/controller/old/OldSubscribeControllerTest.kt @@ -1,21 +1,19 @@ package com.dmforu.api.controller.old -import com.dmforu.api.OldControllerTestSupport +import com.dmforu.api.ControllerTestSupport import com.dmforu.api.controller.old.request.OldDepartmentRequest import com.dmforu.api.controller.old.request.OldKeywordsSubscribeRequest import com.dmforu.api.controller.old.request.OldRegisterSubscribeRequest import com.dmforu.api.controller.old.request.OldTokenRequest -import com.dmforu.api.controller.v1.request.RegisterSubscribeRequest import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.DisplayName import org.springframework.http.MediaType.APPLICATION_JSON import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post -import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status -class OldSubscribeControllerTest : OldControllerTestSupport() { +class OldSubscribeControllerTest : ControllerTestSupport() { @DisplayName("구독을 생성한다.") @Test