From c6e148fc44f29bc86cba45a5abb60047bdc52826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=87=E1=85=A1=E1=86=A8=E1=84=8B=E1=85=B3=E1=86=AB?= =?UTF-8?q?=E1=84=8C=E1=85=B5?= Date: Tue, 3 Oct 2023 16:43:42 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=A3=BC=EC=86=8C=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/application/service/GetShopServiceTest.kt | 2 +- .../application/service/UpdateShopStatusServiceTest.kt | 6 +++--- .../com/mealkitary/shop/domain/shop/address/Address.kt | 8 ++++---- .../kotlin/com/mealkitary/shop/domain/shop/AddressTest.kt | 6 +++--- .../com/mealkitary/shop/domain/shop/ShopAddressTest.kt | 4 ++-- .../com/mealkitary/address/SimpleAddressResolver.kt | 4 ++-- .../src/test/kotlin/SimpleAddressResolverTest.kt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/GetShopServiceTest.kt b/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/GetShopServiceTest.kt index bec01bb..73eec59 100644 --- a/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/GetShopServiceTest.kt +++ b/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/GetShopServiceTest.kt @@ -37,7 +37,7 @@ class GetShopServiceTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) ), mutableListOf(), diff --git a/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/UpdateShopStatusServiceTest.kt b/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/UpdateShopStatusServiceTest.kt index 108f25e..4881a16 100644 --- a/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/UpdateShopStatusServiceTest.kt +++ b/mealkitary-application/src/test/kotlin/com/mealkitary/shop/application/service/UpdateShopStatusServiceTest.kt @@ -38,7 +38,7 @@ class UpdateShopStatusServiceTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) ), mutableListOf(), @@ -70,7 +70,7 @@ class UpdateShopStatusServiceTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) ), mutableListOf(), @@ -102,7 +102,7 @@ class UpdateShopStatusServiceTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) ), mutableListOf(), diff --git a/mealkitary-domain/src/main/kotlin/com/mealkitary/shop/domain/shop/address/Address.kt b/mealkitary-domain/src/main/kotlin/com/mealkitary/shop/domain/shop/address/Address.kt index 2cde784..3e89fd8 100644 --- a/mealkitary-domain/src/main/kotlin/com/mealkitary/shop/domain/shop/address/Address.kt +++ b/mealkitary-domain/src/main/kotlin/com/mealkitary/shop/domain/shop/address/Address.kt @@ -11,8 +11,8 @@ class Address( val region2DepthName: String, @Column(name = "region_3depth_name") val region3DepthName: String, - @Column(name = "region_4depth_name") - val region4DepthName: String + @Column(name = "road_name") + val roadName: String ) { companion object { @@ -20,14 +20,14 @@ class Address( region1DepthName: String, region2DepthName: String, region3DepthName: String, - region4DepthName: String + roadName: String ): Address { return Address( region1DepthName, region2DepthName, region3DepthName, - region4DepthName + roadName ) } } diff --git a/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/AddressTest.kt b/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/AddressTest.kt index e64d8df..3a84bb7 100644 --- a/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/AddressTest.kt +++ b/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/AddressTest.kt @@ -11,18 +11,18 @@ class AddressTest : AnnotationSpec() { val region1DepthName = "서울" val region2DepthName = "강남구" val region3DepthName = "논현동" - val region4DepthName = "논현로" + val roadName = "논현로" val address = Address.of( region1DepthName, region2DepthName, region3DepthName, - region4DepthName + roadName ) address.region1DepthName shouldBe region1DepthName address.region2DepthName shouldBe region2DepthName address.region3DepthName shouldBe region3DepthName - address.region4DepthName shouldBe region4DepthName + address.roadName shouldBe roadName } } diff --git a/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/ShopAddressTest.kt b/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/ShopAddressTest.kt index 512ff4a..9047495 100644 --- a/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/ShopAddressTest.kt +++ b/mealkitary-domain/src/test/kotlin/com/mealkitary/shop/domain/shop/ShopAddressTest.kt @@ -21,7 +21,7 @@ class ShopAddressTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) val shopAddress = ShopAddress.of( @@ -46,7 +46,7 @@ class ShopAddressTest : AnnotationSpec() { "region1DepthName", "region2DepthName", "region3DepthName", - "region4DepthName" + "roadName" ) shouldThrow { diff --git a/mealkitary-infrastructure/adapter-address-resolver/src/main/kotlin/com/mealkitary/address/SimpleAddressResolver.kt b/mealkitary-infrastructure/adapter-address-resolver/src/main/kotlin/com/mealkitary/address/SimpleAddressResolver.kt index b6c0cfc..c3aa189 100644 --- a/mealkitary-infrastructure/adapter-address-resolver/src/main/kotlin/com/mealkitary/address/SimpleAddressResolver.kt +++ b/mealkitary-infrastructure/adapter-address-resolver/src/main/kotlin/com/mealkitary/address/SimpleAddressResolver.kt @@ -21,7 +21,7 @@ class SimpleAddressResolver : AddressResolver { val region1DepthName = value[0] val region2DepthName = value[1] val region3DepthName = value.getOrNull(2) ?: "" - val region4DepthName = value.getOrNull(3) ?: "" + val roadName = value.getOrNull(3) ?: "" // TODO: 좌표 및 지역 코드를 카카오 API에서 받아올 예정 return ShopAddress.of( @@ -34,7 +34,7 @@ class SimpleAddressResolver : AddressResolver { region1DepthName, region2DepthName, region3DepthName, - region4DepthName + roadName ) ) } diff --git a/mealkitary-infrastructure/adapter-address-resolver/src/test/kotlin/SimpleAddressResolverTest.kt b/mealkitary-infrastructure/adapter-address-resolver/src/test/kotlin/SimpleAddressResolverTest.kt index bed0715..79a6e3e 100644 --- a/mealkitary-infrastructure/adapter-address-resolver/src/test/kotlin/SimpleAddressResolverTest.kt +++ b/mealkitary-infrastructure/adapter-address-resolver/src/test/kotlin/SimpleAddressResolverTest.kt @@ -22,7 +22,7 @@ class SimpleAddressResolverTest : AnnotationSpec() { shopAddress.address.region1DepthName shouldBe "서울특별시" shopAddress.address.region2DepthName shouldBe "강남구" shopAddress.address.region3DepthName shouldBe "역삼동" - shopAddress.address.region4DepthName shouldBe "논현로" + shopAddress.address.roadName shouldBe "논현로" } @Test @@ -38,7 +38,7 @@ class SimpleAddressResolverTest : AnnotationSpec() { shopAddress.address.region1DepthName shouldBe "경기도" shopAddress.address.region2DepthName shouldBe "남양주시" shopAddress.address.region3DepthName shouldBe "다산동" - shopAddress.address.region4DepthName shouldBe "" + shopAddress.address.roadName shouldBe "" } @Test @@ -54,7 +54,7 @@ class SimpleAddressResolverTest : AnnotationSpec() { shopAddress.address.region1DepthName shouldBe "제주특별자치도" shopAddress.address.region2DepthName shouldBe "한림읍" shopAddress.address.region3DepthName shouldBe "" - shopAddress.address.region4DepthName shouldBe "" + shopAddress.address.roadName shouldBe "" } @Test