Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidlazio committed May 6, 2024
1 parent e41bd35 commit 6ebc925
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/ConfidenceTests/TypeMapperTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TypeMapperTests: XCTestCase {
func testConfidenceToNetwork() throws {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
formatter.timeZone = TimeZone.init(identifier: "UTC+01")
let date = try XCTUnwrap(formatter.date(from: "2022-01-01 12:00:00"))

let confidenceStruct: ConfidenceStruct = [
Expand All @@ -49,6 +50,7 @@ class TypeMapperTests: XCTestCase {
"list": ConfidenceValue(list: [ConfidenceValue(boolean: true)]),
"struct": ConfidenceValue(structure: ["test": ConfidenceValue(string: "value")]),
"date": ConfidenceValue(date: DateComponents(year: 1990, month: 4, day: 2)),
"timestamp": ConfidenceValue(timestamp: date),
"null": ConfidenceValue.init(null: ())
]
let networkStruct = TypeMapper.convert(structure: confidenceStruct)
Expand All @@ -60,6 +62,7 @@ class TypeMapperTests: XCTestCase {
"list": .list([.boolean(true)]),
"struct": .structure(NetworkStruct(fields: ["test": .string("value")])),
"date": .string("1990-04-02"),
"timestamp": .string("2022-01-01T11:00:00Z"),
"null": .null
])
XCTAssertEqual(networkStruct, expectedNetworkStruct)
Expand Down

0 comments on commit 6ebc925

Please sign in to comment.