From 166b837921df0665e60a1275a8ae784083741e4b Mon Sep 17 00:00:00 2001 From: Jeong Dong Date: Wed, 4 Jun 2025 17:47:48 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[#52]=20UnitTest=20target=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mark-In.xcodeproj/project.pbxproj | 129 +++++++++++++++++- .../xcshareddata/xcschemes/Mark-In.xcscheme | 13 ++ .../xcschemes/[Dev] Mark-In.xcscheme | 13 ++ 3 files changed, 154 insertions(+), 1 deletion(-) diff --git a/Mark-In.xcodeproj/project.pbxproj b/Mark-In.xcodeproj/project.pbxproj index f074719..a0c4a01 100644 --- a/Mark-In.xcodeproj/project.pbxproj +++ b/Mark-In.xcodeproj/project.pbxproj @@ -62,6 +62,13 @@ remoteGlobalIDString = 57AC54A62DA503DE00BA84BD; remoteInfo = LinkMetadataKitInterface; }; + 57664F6C2DF03A9000CA8D68 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 57BFD8BB2DA4E19600648AD4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 57BFD8C22DA4E19600648AD4; + remoteInfo = "Mark-In"; + }; 57AC56722DA511E900BA84BD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */; @@ -93,6 +100,7 @@ /* Begin PBXFileReference section */ 57588CE42DD9B4D500DBD9A7 /* AppDI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AppDI.xcodeproj; path = AppDI/AppDI.xcodeproj; sourceTree = ""; }; 57606D652DD63B14005EBE3D /* ReducerKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReducerKit.xcodeproj; path = ReducerKit/ReducerKit.xcodeproj; sourceTree = ""; }; + 57664F682DF03A9000CA8D68 /* Mark-In-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Mark-In-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 57AC52EF2DA4FBC900BA84BD /* DesignSystem.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DesignSystem.xcodeproj; path = DesignSystem/DesignSystem.xcodeproj; sourceTree = ""; }; 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Util.xcodeproj; path = Util/Util.xcodeproj; sourceTree = ""; }; 57AC53232DA4FC4900BA84BD /* LinkMetadataKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = LinkMetadataKit.xcodeproj; path = LinkMetadataKit/LinkMetadataKit.xcodeproj; sourceTree = ""; }; @@ -112,6 +120,11 @@ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ + 57664F692DF03A9000CA8D68 /* Mark-In-Tests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = "Mark-In-Tests"; + sourceTree = ""; + }; 57BFD8C52DA4E19600648AD4 /* Mark-In */ = { isa = PBXFileSystemSynchronizedRootGroup; exceptions = ( @@ -123,6 +136,13 @@ /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ + 57664F652DF03A9000CA8D68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 57BFD8C02DA4E19600648AD4 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -217,6 +237,7 @@ 57AC56602DA511AF00BA84BD /* Shared */, 57AC565F2DA511A900BA84BD /* Core */, 57BFD8C52DA4E19600648AD4 /* Mark-In */, + 57664F692DF03A9000CA8D68 /* Mark-In-Tests */, 57AC55422DA507EC00BA84BD /* Frameworks */, 57BFD8C42DA4E19600648AD4 /* Products */, ); @@ -228,6 +249,7 @@ isa = PBXGroup; children = ( 57BFD8C32DA4E19600648AD4 /* Mark-In.app */, + 57664F682DF03A9000CA8D68 /* Mark-In-Tests.xctest */, ); name = Products; sourceTree = ""; @@ -235,6 +257,29 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 57664F672DF03A9000CA8D68 /* Mark-In-Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 57664F6E2DF03A9000CA8D68 /* Build configuration list for PBXNativeTarget "Mark-In-Tests" */; + buildPhases = ( + 57664F642DF03A9000CA8D68 /* Sources */, + 57664F652DF03A9000CA8D68 /* Frameworks */, + 57664F662DF03A9000CA8D68 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 57664F6D2DF03A9000CA8D68 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 57664F692DF03A9000CA8D68 /* Mark-In-Tests */, + ); + name = "Mark-In-Tests"; + packageProductDependencies = ( + ); + productName = "Mark-In-Tests"; + productReference = 57664F682DF03A9000CA8D68 /* Mark-In-Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 57BFD8C22DA4E19600648AD4 /* Mark-In */ = { isa = PBXNativeTarget; buildConfigurationList = 57BFD8CF2DA4E19700648AD4 /* Build configuration list for PBXNativeTarget "Mark-In" */; @@ -270,9 +315,13 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1630; + LastSwiftUpdateCheck = 1640; LastUpgradeCheck = 1640; TargetAttributes = { + 57664F672DF03A9000CA8D68 = { + CreatedOnToolsVersion = 16.4; + TestTargetID = 57BFD8C22DA4E19600648AD4; + }; 57BFD8C22DA4E19600648AD4 = { CreatedOnToolsVersion = 16.3; }; @@ -319,6 +368,7 @@ projectRoot = ""; targets = ( 57BFD8C22DA4E19600648AD4 /* Mark-In */, + 57664F672DF03A9000CA8D68 /* Mark-In-Tests */, ); }; /* End PBXProject section */ @@ -369,6 +419,13 @@ /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ + 57664F662DF03A9000CA8D68 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 57BFD8C12DA4E19600648AD4 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -379,6 +436,13 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 57664F642DF03A9000CA8D68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 57BFD8BF2DA4E19600648AD4 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -388,7 +452,61 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 57664F6D2DF03A9000CA8D68 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 57BFD8C22DA4E19600648AD4 /* Mark-In */; + targetProxy = 57664F6C2DF03A9000CA8D68 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ + 57664F6F2DF03A9000CA8D68 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + MACOSX_DEPLOYMENT_TARGET = 15.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "kr.co.ios.swift.apple.Mark-In-Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mark-In.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Mark-In"; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Debug; + }; + 57664F702DF03A9000CA8D68 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.5; + MACOSX_DEPLOYMENT_TARGET = 15.5; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "kr.co.ios.swift.apple.Mark-In-Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mark-In.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Mark-In"; + XROS_DEPLOYMENT_TARGET = 2.5; + }; + name = Release; + }; 57BFD8CD2DA4E19700648AD4 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReferenceAnchor = 57BFD8C52DA4E19600648AD4 /* Mark-In */; @@ -598,6 +716,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 57664F6E2DF03A9000CA8D68 /* Build configuration list for PBXNativeTarget "Mark-In-Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57664F6F2DF03A9000CA8D68 /* Debug */, + 57664F702DF03A9000CA8D68 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 57BFD8BE2DA4E19600648AD4 /* Build configuration list for PBXProject "Mark-In" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Mark-In.xcodeproj/xcshareddata/xcschemes/Mark-In.xcscheme b/Mark-In.xcodeproj/xcshareddata/xcschemes/Mark-In.xcscheme index 2c6fc41..9f3ff0c 100644 --- a/Mark-In.xcodeproj/xcshareddata/xcschemes/Mark-In.xcscheme +++ b/Mark-In.xcodeproj/xcshareddata/xcschemes/Mark-In.xcscheme @@ -29,6 +29,19 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" shouldAutocreateTestPlan = "YES"> + + + + + + + + + + + + Date: Wed, 4 Jun 2025 17:53:02 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[#52]=20CodingKey,=20FieldKey=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOFieldKeyMappingTests.swift | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift diff --git a/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift new file mode 100644 index 0000000..9b5b125 --- /dev/null +++ b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift @@ -0,0 +1,32 @@ +// +// Mark_In_Tests.swift +// Mark-In-Tests +// +// Created by 이정동 on 6/4/25. +// + +import Testing +@testable import Mark_In + +struct DTOFieldKeyMappingTests { + + @Test + func testCodingKeys_shouldMatchFirestoreFieldKeys_inFolderDTO() async throws { + #expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id) + #expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name) + #expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt) + } + + @Test + func testCodingKeys_shouldMatchFirestoreFieldKeys_inWebLinkDTO() async throws { + #expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id) + #expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url) + #expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title) + #expect(WebLinkDTO.CodingKeys.thumbnailUrl.rawValue == FirestoreFieldKey.Link.thumbnailUrl) + #expect(WebLinkDTO.CodingKeys.faviconUrl.rawValue == FirestoreFieldKey.Link.faviconUrl) + #expect(WebLinkDTO.CodingKeys.isPinned.rawValue == FirestoreFieldKey.Link.isPinned) + #expect(WebLinkDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Link.createdAt) + #expect(WebLinkDTO.CodingKeys.lastAccessedAt.rawValue == FirestoreFieldKey.Link.lastAccessedAt) + #expect(WebLinkDTO.CodingKeys.folderID.rawValue == FirestoreFieldKey.Link.folderID) + } +} From 7927f858c7c67c00b15b5e2f7a7bba917092a1db Mon Sep 17 00:00:00 2001 From: Jeong Dong Date: Fri, 6 Jun 2025 14:40:07 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[#52]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=A9=94=EC=84=9C=EB=93=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift index 9b5b125..84eb328 100644 --- a/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift +++ b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift @@ -11,14 +11,14 @@ import Testing struct DTOFieldKeyMappingTests { @Test - func testCodingKeys_shouldMatchFirestoreFieldKeys_inFolderDTO() async throws { + func test_FolderDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws { #expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id) #expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name) #expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt) } @Test - func testCodingKeys_shouldMatchFirestoreFieldKeys_inWebLinkDTO() async throws { + func test_WebLinkDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws { #expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id) #expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url) #expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title) From 254feb4272620825ad9a71e5012ae0deb2cbb2ee Mon Sep 17 00:00:00 2001 From: Jeong Dong Date: Fri, 6 Jun 2025 15:32:27 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[#52]=20TestSupport=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mark-In.xcodeproj/project.pbxproj | 43 ++ .../TestSupport.xcodeproj/project.pbxproj | 376 ++++++++++++++++++ .../TestSupport/BaseTestCase.swift | 34 ++ 3 files changed, 453 insertions(+) create mode 100644 Shared/TestSupport/TestSupport.xcodeproj/project.pbxproj create mode 100644 Shared/TestSupport/TestSupport/BaseTestCase.swift diff --git a/Mark-In.xcodeproj/project.pbxproj b/Mark-In.xcodeproj/project.pbxproj index a0c4a01..ed612ee 100644 --- a/Mark-In.xcodeproj/project.pbxproj +++ b/Mark-In.xcodeproj/project.pbxproj @@ -17,6 +17,8 @@ 57664F242DEEB2A100CA8D68 /* LinkMetadataKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57664F1C2DEDCDCB00CA8D68 /* LinkMetadataKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 57664F252DEEB2A100CA8D68 /* LinkMetadataKitInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57664F1E2DEDCDCB00CA8D68 /* LinkMetadataKitInterface.framework */; }; 57664F262DEEB2A100CA8D68 /* LinkMetadataKitInterface.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57664F1E2DEDCDCB00CA8D68 /* LinkMetadataKitInterface.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 57664FE42DF2C0B900CA8D68 /* TestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57664FB62DF2BF5900CA8D68 /* TestSupport.framework */; }; + 57664FE52DF2C0B900CA8D68 /* TestSupport.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57664FB62DF2BF5900CA8D68 /* TestSupport.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 57944D0C2DC52AEF00EF3D9A /* GoogleSignIn in Frameworks */ = {isa = PBXBuildFile; productRef = 57944D0B2DC52AEF00EF3D9A /* GoogleSignIn */; }; 57AC56A82DA5120600BA84BD /* Util.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57AC56732DA511E900BA84BD /* Util.framework */; }; 57AC56A92DA5120600BA84BD /* Util.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 57AC56732DA511E900BA84BD /* Util.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -69,6 +71,13 @@ remoteGlobalIDString = 57BFD8C22DA4E19600648AD4; remoteInfo = "Mark-In"; }; + 57664FB52DF2BF5900CA8D68 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 57664FB12DF2BF5900CA8D68 /* TestSupport.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 57664FA72DF2BF5800CA8D68; + remoteInfo = TestSupport; + }; 57AC56722DA511E900BA84BD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */; @@ -79,6 +88,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 57664FE62DF2C0B900CA8D68 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 57664FE52DF2C0B900CA8D68 /* TestSupport.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; 57AC55452DA507EC00BA84BD /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -101,6 +121,7 @@ 57588CE42DD9B4D500DBD9A7 /* AppDI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AppDI.xcodeproj; path = AppDI/AppDI.xcodeproj; sourceTree = ""; }; 57606D652DD63B14005EBE3D /* ReducerKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReducerKit.xcodeproj; path = ReducerKit/ReducerKit.xcodeproj; sourceTree = ""; }; 57664F682DF03A9000CA8D68 /* Mark-In-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Mark-In-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 57664FB12DF2BF5900CA8D68 /* TestSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TestSupport.xcodeproj; path = TestSupport/TestSupport.xcodeproj; sourceTree = ""; }; 57AC52EF2DA4FBC900BA84BD /* DesignSystem.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DesignSystem.xcodeproj; path = DesignSystem/DesignSystem.xcodeproj; sourceTree = ""; }; 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Util.xcodeproj; path = Util/Util.xcodeproj; sourceTree = ""; }; 57AC53232DA4FC4900BA84BD /* LinkMetadataKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = LinkMetadataKit.xcodeproj; path = LinkMetadataKit/LinkMetadataKit.xcodeproj; sourceTree = ""; }; @@ -140,6 +161,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 57664FE42DF2C0B900CA8D68 /* TestSupport.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -180,6 +202,14 @@ name = Products; sourceTree = ""; }; + 57664FB22DF2BF5900CA8D68 /* Products */ = { + isa = PBXGroup; + children = ( + 57664FB62DF2BF5900CA8D68 /* TestSupport.framework */, + ); + name = Products; + sourceTree = ""; + }; 57985FAB2DDDC2CD00A383F2 /* Products */ = { isa = PBXGroup; children = ( @@ -218,6 +248,7 @@ 57AC56602DA511AF00BA84BD /* Shared */ = { isa = PBXGroup; children = ( + 57664FB12DF2BF5900CA8D68 /* TestSupport.xcodeproj */, 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */, ); path = Shared; @@ -264,6 +295,7 @@ 57664F642DF03A9000CA8D68 /* Sources */, 57664F652DF03A9000CA8D68 /* Frameworks */, 57664F662DF03A9000CA8D68 /* Resources */, + 57664FE62DF2C0B900CA8D68 /* Embed Frameworks */, ); buildRules = ( ); @@ -360,6 +392,10 @@ ProductGroup = 57588A542DD63B5900DBD9A7 /* Products */; ProjectRef = 57606D652DD63B14005EBE3D /* ReducerKit.xcodeproj */; }, + { + ProductGroup = 57664FB22DF2BF5900CA8D68 /* Products */; + ProjectRef = 57664FB12DF2BF5900CA8D68 /* TestSupport.xcodeproj */; + }, { ProductGroup = 57AC566F2DA511E900BA84BD /* Products */; ProjectRef = 57AC53092DA4FC1800BA84BD /* Util.xcodeproj */; @@ -409,6 +445,13 @@ remoteRef = 57664F1D2DEDCDCB00CA8D68 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 57664FB62DF2BF5900CA8D68 /* TestSupport.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = TestSupport.framework; + remoteRef = 57664FB52DF2BF5900CA8D68 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 57AC56732DA511E900BA84BD /* Util.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; diff --git a/Shared/TestSupport/TestSupport.xcodeproj/project.pbxproj b/Shared/TestSupport/TestSupport.xcodeproj/project.pbxproj new file mode 100644 index 0000000..22aca84 --- /dev/null +++ b/Shared/TestSupport/TestSupport.xcodeproj/project.pbxproj @@ -0,0 +1,376 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXFileReference section */ + 57664FA72DF2BF5800CA8D68 /* TestSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 57664FA92DF2BF5800CA8D68 /* TestSupport */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = TestSupport; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 57664FA42DF2BF5800CA8D68 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 57664F9D2DF2BF5800CA8D68 = { + isa = PBXGroup; + children = ( + 57664FA92DF2BF5800CA8D68 /* TestSupport */, + 57664FA82DF2BF5800CA8D68 /* Products */, + ); + sourceTree = ""; + }; + 57664FA82DF2BF5800CA8D68 /* Products */ = { + isa = PBXGroup; + children = ( + 57664FA72DF2BF5800CA8D68 /* TestSupport.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 57664FA22DF2BF5800CA8D68 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 57664FA62DF2BF5800CA8D68 /* TestSupport */ = { + isa = PBXNativeTarget; + buildConfigurationList = 57664FAE2DF2BF5800CA8D68 /* Build configuration list for PBXNativeTarget "TestSupport" */; + buildPhases = ( + 57664FA22DF2BF5800CA8D68 /* Headers */, + 57664FA32DF2BF5800CA8D68 /* Sources */, + 57664FA42DF2BF5800CA8D68 /* Frameworks */, + 57664FA52DF2BF5800CA8D68 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 57664FA92DF2BF5800CA8D68 /* TestSupport */, + ); + name = TestSupport; + packageProductDependencies = ( + ); + productName = TestSupport; + productReference = 57664FA72DF2BF5800CA8D68 /* TestSupport.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 57664F9E2DF2BF5800CA8D68 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; + TargetAttributes = { + 57664FA62DF2BF5800CA8D68 = { + CreatedOnToolsVersion = 16.4; + LastSwiftMigration = 1640; + }; + }; + }; + buildConfigurationList = 57664FA12DF2BF5800CA8D68 /* Build configuration list for PBXProject "TestSupport" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 57664F9D2DF2BF5800CA8D68; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 57664FA82DF2BF5800CA8D68 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 57664FA62DF2BF5800CA8D68 /* TestSupport */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 57664FA52DF2BF5800CA8D68 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 57664FA32DF2BF5800CA8D68 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 57664FAC2DF2BF5800CA8D68 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 57664FAD2DF2BF5800CA8D68 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 57664FAF2DF2BF5800CA8D68 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = NO; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + ENABLE_TESTABILITY = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = kr.co.ios.swift.apple.TestSupport; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_MODULE = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + 57664FB02DF2BF5800CA8D68 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = NO; + DEVELOPMENT_TEAM = 5DFZR8RCQR; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = kr.co.ios.swift.apple.TestSupport; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_MODULE = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 57664FA12DF2BF5800CA8D68 /* Build configuration list for PBXProject "TestSupport" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57664FAC2DF2BF5800CA8D68 /* Debug */, + 57664FAD2DF2BF5800CA8D68 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 57664FAE2DF2BF5800CA8D68 /* Build configuration list for PBXNativeTarget "TestSupport" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57664FAF2DF2BF5800CA8D68 /* Debug */, + 57664FB02DF2BF5800CA8D68 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 57664F9E2DF2BF5800CA8D68 /* Project object */; +} diff --git a/Shared/TestSupport/TestSupport/BaseTestCase.swift b/Shared/TestSupport/TestSupport/BaseTestCase.swift new file mode 100644 index 0000000..7fdcc3a --- /dev/null +++ b/Shared/TestSupport/TestSupport/BaseTestCase.swift @@ -0,0 +1,34 @@ +// +// BaseTestCase.swift +// TestSupport +// +// Created by 이정동 on 6/6/25. +// + +import Foundation + +public protocol BaseTestCase { + /// 초기에 주입받아야 할 데이터를 지정합니다 + func given(_ task: () -> Void) + + /// 발생해야 할 이벤트, 또는 메소드 호출등을 실행시킵니다 + func when(_ task: () -> Void) + + /// 결과 값이 기대와 같은지 확인합니다 + func then(_ task: () -> Void) +} + +public extension BaseTestCase { + + func given(_ task: () -> Void) { + task() + } + + func when(_ task: () -> Void) { + task() + } + + func then(_ task: () -> Void) { + task() + } +} From 5075f2b44fc779c7a2b42c0bfb05eef2a5e2d5ff Mon Sep 17 00:00:00 2001 From: Jeong Dong Date: Fri, 6 Jun 2025 15:32:58 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[#52]=20given,=20when,=20then=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTOFieldKeyMappingTests.swift | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift index 84eb328..1535154 100644 --- a/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift +++ b/Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift @@ -6,27 +6,41 @@ // import Testing +import TestSupport + @testable import Mark_In -struct DTOFieldKeyMappingTests { +struct DTOFieldKeyMappingTests: BaseTestCase { @Test func test_FolderDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws { - #expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id) - #expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name) - #expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt) + given { } + + when { } + + then { + #expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id) + #expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name) + #expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt) + } } @Test func test_WebLinkDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws { - #expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id) - #expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url) - #expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title) - #expect(WebLinkDTO.CodingKeys.thumbnailUrl.rawValue == FirestoreFieldKey.Link.thumbnailUrl) - #expect(WebLinkDTO.CodingKeys.faviconUrl.rawValue == FirestoreFieldKey.Link.faviconUrl) - #expect(WebLinkDTO.CodingKeys.isPinned.rawValue == FirestoreFieldKey.Link.isPinned) - #expect(WebLinkDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Link.createdAt) - #expect(WebLinkDTO.CodingKeys.lastAccessedAt.rawValue == FirestoreFieldKey.Link.lastAccessedAt) - #expect(WebLinkDTO.CodingKeys.folderID.rawValue == FirestoreFieldKey.Link.folderID) + given { } + + when { } + + then { + #expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id) + #expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url) + #expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title) + #expect(WebLinkDTO.CodingKeys.thumbnailUrl.rawValue == FirestoreFieldKey.Link.thumbnailUrl) + #expect(WebLinkDTO.CodingKeys.faviconUrl.rawValue == FirestoreFieldKey.Link.faviconUrl) + #expect(WebLinkDTO.CodingKeys.isPinned.rawValue == FirestoreFieldKey.Link.isPinned) + #expect(WebLinkDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Link.createdAt) + #expect(WebLinkDTO.CodingKeys.lastAccessedAt.rawValue == FirestoreFieldKey.Link.lastAccessedAt) + #expect(WebLinkDTO.CodingKeys.folderID.rawValue == FirestoreFieldKey.Link.folderID) + } } }