Skip to content

Commit 5075f2b

Browse files
committed
[#52] given, when, then 구분
1 parent 254feb4 commit 5075f2b

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

Mark-In-Tests/ValidationsTests/DTOFieldKeyMappingTests.swift

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,41 @@
66
//
77

88
import Testing
9+
import TestSupport
10+
911
@testable import Mark_In
1012

11-
struct DTOFieldKeyMappingTests {
13+
struct DTOFieldKeyMappingTests: BaseTestCase {
1214

1315
@Test
1416
func test_FolderDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws {
15-
#expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id)
16-
#expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name)
17-
#expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt)
17+
given { }
18+
19+
when { }
20+
21+
then {
22+
#expect(FolderDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Folder.id)
23+
#expect(FolderDTO.CodingKeys.name.rawValue == FirestoreFieldKey.Folder.name)
24+
#expect(FolderDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Folder.createdAt)
25+
}
1826
}
1927

2028
@Test
2129
func test_WebLinkDTO의_CodingKey와_FirestoreFieldKey가_일치해야_한다() async throws {
22-
#expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id)
23-
#expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url)
24-
#expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title)
25-
#expect(WebLinkDTO.CodingKeys.thumbnailUrl.rawValue == FirestoreFieldKey.Link.thumbnailUrl)
26-
#expect(WebLinkDTO.CodingKeys.faviconUrl.rawValue == FirestoreFieldKey.Link.faviconUrl)
27-
#expect(WebLinkDTO.CodingKeys.isPinned.rawValue == FirestoreFieldKey.Link.isPinned)
28-
#expect(WebLinkDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Link.createdAt)
29-
#expect(WebLinkDTO.CodingKeys.lastAccessedAt.rawValue == FirestoreFieldKey.Link.lastAccessedAt)
30-
#expect(WebLinkDTO.CodingKeys.folderID.rawValue == FirestoreFieldKey.Link.folderID)
30+
given { }
31+
32+
when { }
33+
34+
then {
35+
#expect(WebLinkDTO.CodingKeys.id.rawValue == FirestoreFieldKey.Link.id)
36+
#expect(WebLinkDTO.CodingKeys.url.rawValue == FirestoreFieldKey.Link.url)
37+
#expect(WebLinkDTO.CodingKeys.title.rawValue == FirestoreFieldKey.Link.title)
38+
#expect(WebLinkDTO.CodingKeys.thumbnailUrl.rawValue == FirestoreFieldKey.Link.thumbnailUrl)
39+
#expect(WebLinkDTO.CodingKeys.faviconUrl.rawValue == FirestoreFieldKey.Link.faviconUrl)
40+
#expect(WebLinkDTO.CodingKeys.isPinned.rawValue == FirestoreFieldKey.Link.isPinned)
41+
#expect(WebLinkDTO.CodingKeys.createdAt.rawValue == FirestoreFieldKey.Link.createdAt)
42+
#expect(WebLinkDTO.CodingKeys.lastAccessedAt.rawValue == FirestoreFieldKey.Link.lastAccessedAt)
43+
#expect(WebLinkDTO.CodingKeys.folderID.rawValue == FirestoreFieldKey.Link.folderID)
44+
}
3145
}
3246
}

0 commit comments

Comments
 (0)