ZcashLightClientKit/Tests/OfflineTests/TxIdTests.swift

20 lines
566 B
Swift
Raw Normal View History

2020-01-14 14:25:14 -08:00
//
// TxIdTests.swift
// ZcashLightClientKit-Unit-Tests
//
// Created by Francisco Gindre on 1/10/20.
//
import XCTest
2022-02-28 09:03:20 -08:00
@testable import TestUtils
2020-01-14 14:25:14 -08:00
2021-09-23 06:26:41 -07:00
// swiftlint:disable force_unwrapping
2020-01-14 14:25:14 -08:00
class TxIdTests: XCTestCase {
func testTxIdAsString() {
let transactionId = "5cf915c5d01007c39d602e08ab59d98aba366e2fb7ac01f2cdad4bf4f8f300bb"
2020-01-15 10:30:59 -08:00
let expectedTxIdString = "bb00f3f8f44badcdf201acb72f6e36ba8ad959ab082e609dc30710d0c515f95c"
2020-01-14 14:25:14 -08:00
XCTAssertEqual(Data(fromHexEncodedString: transactionId)!.toHexStringTxId(), expectedTxIdString)
2020-01-14 14:25:14 -08:00
}
}