From fe68e10a3c0b68191127cc26494958904be035c8 Mon Sep 17 00:00:00 2001 From: Chris Park Date: Sat, 23 Dec 2023 18:03:43 +0900 Subject: [PATCH] test: Add new properties on test codes --- .../domain/search/FakeSearchV2ControllerTest.java | 7 ++++++- .../breadmapbackend/mock/FakeSearchServiceImpl.java | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/depromeet/breadmapbackend/domain/search/FakeSearchV2ControllerTest.java b/src/test/java/com/depromeet/breadmapbackend/domain/search/FakeSearchV2ControllerTest.java index d1048fcb..be5f0cd0 100644 --- a/src/test/java/com/depromeet/breadmapbackend/domain/search/FakeSearchV2ControllerTest.java +++ b/src/test/java/com/depromeet/breadmapbackend/domain/search/FakeSearchV2ControllerTest.java @@ -85,7 +85,12 @@ void searchKeyword() throws Exception { fieldWithPath("data.searchResultDtoList.[].address").description("빵집 주소"), fieldWithPath("data.searchResultDtoList.[].totalScore").description("빵집 점수"), fieldWithPath("data.searchResultDtoList.[].reviewNum").description("빵집 리뷰 갯수"), - fieldWithPath("data.searchResultDtoList.[].distance").description("빵집까지 거리") + fieldWithPath("data.searchResultDtoList.[].distance").description("빵집까지 거리"), + fieldWithPath("data.searchResultDtoList.[].latitude").description("위도"), + fieldWithPath("data.searchResultDtoList.[].longitude").description("경도"), + fieldWithPath("data.searchResultDtoList.[].bakeryImageUrl").description("빵집 이미지 URL"), + fieldWithPath("data.searchResultDtoList.[].flagCount").description("깃발 갯수"), + fieldWithPath("data.searchResultDtoList.[].flagColor").description("깃발 색깔") ) )) .andExpect(status().isOk()); diff --git a/src/test/java/com/depromeet/breadmapbackend/mock/FakeSearchServiceImpl.java b/src/test/java/com/depromeet/breadmapbackend/mock/FakeSearchServiceImpl.java index a45197aa..82fa2f91 100644 --- a/src/test/java/com/depromeet/breadmapbackend/mock/FakeSearchServiceImpl.java +++ b/src/test/java/com/depromeet/breadmapbackend/mock/FakeSearchServiceImpl.java @@ -1,11 +1,13 @@ package com.depromeet.breadmapbackend.mock; +import com.depromeet.breadmapbackend.domain.flag.FlagColor; import com.depromeet.breadmapbackend.domain.search.SearchService; import com.depromeet.breadmapbackend.domain.search.dto.SearchDto; import com.depromeet.breadmapbackend.domain.search.dto.SearchResultDto; import com.depromeet.breadmapbackend.domain.search.dto.SearchType; import com.depromeet.breadmapbackend.domain.search.dto.keyword.response.SearchResultResponse; +import java.util.Collections; import java.util.List; /** @@ -41,6 +43,11 @@ public SearchResultResponse searchEngine( .totalScore(5d) .reviewNum(5L) .distance(100d) + .bakeryImageUrl(Collections.singletonList("https://test.com")) + .latitude(123d) + .longitude(123d) + .flagCount(123) + .flagColor(FlagColor.ORANGE.getCode()) .build(); return SearchResultResponse