|
6 | 6 | // |
7 | 7 |
|
8 | 8 | import Testing |
| 9 | +import TestSupport |
| 10 | + |
9 | 11 | @testable import Mark_In |
10 | 12 |
|
11 | | -struct DTOFieldKeyMappingTests { |
| 13 | +struct DTOFieldKeyMappingTests: BaseTestCase { |
12 | 14 |
|
13 | 15 | @Test |
14 | 16 | 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 | + } |
18 | 26 | } |
19 | 27 |
|
20 | 28 | @Test |
21 | 29 | 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 | + } |
31 | 45 | } |
32 | 46 | } |
0 commit comments