From 6f99e72cfd1c9a8d541c2cfb63250e25fe1f91d6 Mon Sep 17 00:00:00 2001 From: San Kim Date: Sun, 1 Dec 2024 17:21:55 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20Test=20Fail=20by=20fixture=20?= =?UTF-8?q?monkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../threedays/domain/user/entity/UserTest.kt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/domain/src/test/kotlin/com/threedays/domain/user/entity/UserTest.kt b/domain/src/test/kotlin/com/threedays/domain/user/entity/UserTest.kt index 01d4ab2..59377ff 100644 --- a/domain/src/test/kotlin/com/threedays/domain/user/entity/UserTest.kt +++ b/domain/src/test/kotlin/com/threedays/domain/user/entity/UserTest.kt @@ -15,6 +15,7 @@ import io.kotest.core.annotation.DisplayName import io.kotest.core.spec.style.DescribeSpec import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldNotBe +import java.net.URL import java.time.Year @DisplayName("[도메인][유저] 유저") @@ -184,10 +185,17 @@ class UserTest : DescribeSpec({ .set(UserDesiredPartner::allowSameCompany, null) .sample() + val userProfileImageUrl: URL = URL("http://example.com") + val userProfileImage = fixtureMonkey + .giveMeBuilder() + .set(UserProfileImage::url, userProfileImageUrl) + .sampleList(1) + val user: User = fixtureMonkey .giveMeBuilder() .set(User::name, User.Name("홍길동")) .set(User::phoneNumber, PhoneNumber("01012345678")) + .set(User::profileImages, userProfileImage) .set(User::desiredPartner, userDesiredPartner) .sample() @@ -212,11 +220,18 @@ class UserTest : DescribeSpec({ .set(UserDesiredPartner::allowSameCompany, null) .sample() + val userProfileImageUrl: URL = URL("http://example.com") + val userProfileImage = fixtureMonkey + .giveMeBuilder() + .set(UserProfileImage::url, userProfileImageUrl) + .sampleList(1) + val user: User = fixtureMonkey .giveMeBuilder() .set(User::name, User.Name("홍길동")) .set(User::phoneNumber, PhoneNumber("01012345678")) .set(User::desiredPartner, userDesiredPartner) + .set(User::profileImages, userProfileImage) .sample() .putProfileWidget(profileWidget) @@ -243,10 +258,17 @@ class UserTest : DescribeSpec({ .set(UserDesiredPartner::allowSameCompany, null) .sample() + val userProfileImageUrl: URL = URL("http://example.com") + val userProfileImage = fixtureMonkey + .giveMeBuilder() + .set(UserProfileImage::url, userProfileImageUrl) + .sampleList(1) + val user: User = fixtureMonkey .giveMeBuilder() .set(User::name, User.Name("홍길동")) .set(User::phoneNumber, PhoneNumber("01012345678")) + .set(User::profileImages, userProfileImage) .set(User::desiredPartner, userDesiredPartner) .sample() @@ -286,9 +308,16 @@ class UserTest : DescribeSpec({ .set(UserDesiredPartner::allowSameCompany, null) .sample() + val userProfileImageUrl: URL = URL("http://example.com") + val userProfileImage = fixtureMonkey + .giveMeBuilder() + .set(UserProfileImage::url, userProfileImageUrl) + .sampleList(1) + val user: User = fixtureMonkey .giveMeBuilder() .set(User::name, User.Name("홍길동")) + .set(User::profileImages, userProfileImage) .set(User::phoneNumber, PhoneNumber("01012345678")) .set(User::desiredPartner, userDesiredPartner) .sample()