DataLireCoder swift package
This commit is contained in:
parent
2cca986016
commit
5aec6ea578
60 changed files with 7144 additions and 0 deletions
18
Tests/DLCCommonTests/Structures/RowCodingKeyTests.swift
Normal file
18
Tests/DLCCommonTests/Structures/RowCodingKeyTests.swift
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import XCTest
|
||||
import DLCCommon
|
||||
|
||||
final class RowCodingKeyTests: XCTestCase {
|
||||
func testInitWithStringValue() {
|
||||
let key = RowCodingKey(stringValue: "testKey")
|
||||
|
||||
XCTAssertEqual(key.stringValue, "testKey", "String value does not match the expected value.")
|
||||
XCTAssertNil(key.intValue, "Integer value should be nil when initialized with a string.")
|
||||
}
|
||||
|
||||
func testInitWithIntValue() {
|
||||
let key = RowCodingKey(intValue: 5)
|
||||
|
||||
XCTAssertEqual(key.stringValue, "Index 5", "String value does not match the expected format.")
|
||||
XCTAssertEqual(key.intValue, 5, "Integer value does not match the expected value.")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue