Skip to content

Commit

Permalink
[refactor]primitive value -> VO Class
Browse files Browse the repository at this point in the history
  • Loading branch information
0702Yoon committed Dec 23, 2023
1 parent a3cc447 commit 1f7c97f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonProperty
@JvmInline
value class Latitude(
@JsonProperty(value = "latitude")
val value : Double
){
val value: Double,

Check warning on line 8 in src/main/kotlin/com/mjucow/eatda/common/vo/deseializer/Latitude.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/mjucow/eatda/common/vo/deseializer/Latitude.kt#L8

Added line #L8 was not covered by tests
) {
init {
if (value < -90 || value > 90) {
throw IllegalArgumentException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package com.mjucow.eatda.common.vo.deseializer

import com.fasterxml.jackson.annotation.JsonProperty
@JvmInline
value class Longitude(
value class Longitude(
@JsonProperty(value = "longitude")
val value: Double) {
val value: Double,

Check warning on line 7 in src/main/kotlin/com/mjucow/eatda/common/vo/deseializer/Longitude.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/mjucow/eatda/common/vo/deseializer/Longitude.kt#L7

Added line #L7 was not covered by tests
) {
init {
if (value !in 0.0..180.0) {
throw IllegalArgumentException()
}
}

}

0 comments on commit 1f7c97f

Please sign in to comment.