File tree Expand file tree Collapse file tree
main/java/com/yogieat/controller/v1/region/response
test/java/com/yogieat/controller/v1/region Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import com .yogieat .common .GeoJson ;
44import com .yogieat .region .domain .RegionMaster ;
5+ import com .yogieat .region .domain .RegionStatus ;
56import io .swagger .v3 .oas .annotations .media .Schema ;
67import java .util .List ;
78
@@ -25,6 +26,8 @@ public record RegionItemResponse(
2526 String province ,
2627 @ Schema (description = "지역 표시명" , example = "강남역" )
2728 String displayName ,
29+ @ Schema (description = "지역 운영 상태" , example = "ACTIVE" )
30+ RegionStatus status ,
2831 @ Schema (description = "지역 기준 좌표" )
2932 GeoJson .Point coordinatesStandard
3033 ) {
@@ -33,6 +36,7 @@ public static RegionItemResponse from(RegionMaster region) {
3336 region .code (),
3437 region .province (),
3538 region .displayName (),
39+ region .status (),
3640 region .coordinatesStandard ()
3741 );
3842 }
Original file line number Diff line number Diff line change @@ -80,8 +80,10 @@ void getRegions_ShouldReturnOk() throws Exception {
8080 .andExpect (jsonPath ("$.data.regions[0].code" ).value ("GANGNAM" ))
8181 .andExpect (jsonPath ("$.data.regions[0].province" ).value ("서울" ))
8282 .andExpect (jsonPath ("$.data.regions[0].displayName" ).value ("강남역" ))
83+ .andExpect (jsonPath ("$.data.regions[0].status" ).value ("ACTIVE" ))
8384 .andExpect (jsonPath ("$.data.regions[0].coordinatesStandard.coordinates[0]" ).value (127.0276 ))
8485 .andExpect (jsonPath ("$.data.regions[1].code" ).value ("HONGDAE" ))
86+ .andExpect (jsonPath ("$.data.regions[1].status" ).value ("ACTIVE" ))
8587 .andExpect (jsonPath ("$.data.regions[2].code" ).value ("YEOKSAM" ))
8688 .andExpect (jsonPath ("$.data.regions[2].displayName" ).value ("역삼역" ));
8789 }
You can’t perform that action at this time.
0 commit comments