From 6ebc92549c7ea556200110a1a6feaef0b63ce9ce Mon Sep 17 00:00:00 2001 From: vahid torkaman Date: Mon, 6 May 2024 18:23:34 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! debug tests --- Tests/ConfidenceTests/TypeMapperTests.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/ConfidenceTests/TypeMapperTests.swift b/Tests/ConfidenceTests/TypeMapperTests.swift index 7b55dc51..ac5168f7 100644 --- a/Tests/ConfidenceTests/TypeMapperTests.swift +++ b/Tests/ConfidenceTests/TypeMapperTests.swift @@ -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 = [ @@ -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) @@ -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)