Skip to content

Commit bd44a90

Browse files
chore: delete useless types
1 parent 241b874 commit bd44a90

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

src/main/kotlin/entity/healthprofessional/HealthProfessionalData.kt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ object HealthProfessionalData {
2424
/** The health professional gender. */
2525
val gender: Gender,
2626
/** The health professional birthdate. */
27-
val birthdate: Birthdate,
27+
val birthdate: String,
2828
/** The health professional email address. */
2929
val emailAddress: String,
3030
/** The health professional phone number. */
31-
val phoneNumber: PhoneNumber,
31+
val phoneNumber: String,
3232
/** The health professional role. */
3333
val role: HealthProfessionalRole
3434
) {
@@ -58,17 +58,4 @@ object HealthProfessionalData {
5858
enum class HealthProfessionalRole {
5959
SURGEON, ANESTHETIST, NURSE,
6060
}
61-
62-
/** The phone [number] preceded by the [prefix]. */
63-
data class PhoneNumber(
64-
val prefix: String,
65-
val number: String,
66-
)
67-
68-
/** The model of the birthdate, composed by the [year], the [month] and the [day]. */
69-
data class Birthdate(val year: String, val month: String, val day: String) {
70-
override fun toString(): String {
71-
return "$year-$month-$day"
72-
}
73-
}
7461
}

src/test/kotlin/entity/healthprofessional/HealthProfessionalTest.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88

99
package entity.healthprofessional
1010

11-
import entity.healthprofessional.HealthProfessionalData.Birthdate
1211
import entity.healthprofessional.HealthProfessionalData.Gender
1312
import entity.healthprofessional.HealthProfessionalData.HealthProfessional
1413
import entity.healthprofessional.HealthProfessionalData.HealthProfessionalRole
15-
import entity.healthprofessional.HealthProfessionalData.PhoneNumber
1614
import io.kotest.assertions.throwables.shouldThrow
1715
import io.kotest.core.spec.style.StringSpec
1816
import io.kotest.matchers.shouldBe
@@ -24,9 +22,9 @@ class HealthProfessionalTest : StringSpec({
2422
"Jack",
2523
"Fritz",
2624
Gender.MALE,
27-
Birthdate("1999", "20", "3"),
25+
"1999-20-03",
2826
"jackfritz@gmail.com",
29-
PhoneNumber("+39", "3328455753"),
27+
"+39 3328455753",
3028
HealthProfessionalRole.ANESTHETIST
3129
)
3230

@@ -37,9 +35,9 @@ class HealthProfessionalTest : StringSpec({
3735
"Jack",
3836
"Fritz",
3937
Gender.MALE,
40-
Birthdate("1999", "20", "3"),
38+
"1999-20-03",
4139
"jackfritz@gmail.com",
42-
PhoneNumber("+39", "3328455753"),
40+
"+39 3328455753",
4341
HealthProfessionalRole.ANESTHETIST
4442
)
4543
}

0 commit comments

Comments
 (0)