From 0c9f3cb5efd24d22a849dc19374309fe1c532ef1 Mon Sep 17 00:00:00 2001 From: Francisco Gindre Date: Fri, 11 Dec 2020 18:07:51 -0300 Subject: [PATCH] add stubs, fix typo --- ZcashLightClientKitTests/DerivationToolTests.swift | 2 +- ZcashLightClientKitTests/utils/FakeService.swift | 4 ++++ ZcashLightClientKitTests/utils/Stubs.swift | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ZcashLightClientKitTests/DerivationToolTests.swift b/ZcashLightClientKitTests/DerivationToolTests.swift index 0b6cb2b8..1f2497c3 100644 --- a/ZcashLightClientKitTests/DerivationToolTests.swift +++ b/ZcashLightClientKitTests/DerivationToolTests.swift @@ -74,7 +74,7 @@ class DerivationToolTests: XCTestCase { } func testDeriveSecretKeyFromSeed() throws { - XCTAss ertEqual(try DerivationTool.default.deriveTransparentPrivateKey(seed: [UInt8](seedData)), "127ec31a3482e53940aaefbc41c9621a344c84e4e16cc2c9af380d81b8f7bb74") + XCTAssertEqual(try DerivationTool.default.deriveTransparentPrivateKey(seed: [UInt8](seedData)), "127ec31a3482e53940aaefbc41c9621a344c84e4e16cc2c9af380d81b8f7bb74") } } diff --git a/ZcashLightClientKitTests/utils/FakeService.swift b/ZcashLightClientKitTests/utils/FakeService.swift index 929f153b..7e3b0518 100644 --- a/ZcashLightClientKitTests/utils/FakeService.swift +++ b/ZcashLightClientKitTests/utils/FakeService.swift @@ -18,6 +18,10 @@ struct LightWalletServiceMockResponse: LightWalletServiceResponse { } class MockLightWalletService: LightWalletService { + func fetchUTXOs(for tAddress: String, result: @escaping (Result<[UnspentTransactionOutputEntity], LightWalletServiceError>) -> Void) { + + } + private var service = LightWalletGRPCService(channel: ChannelProvider().channel()) diff --git a/ZcashLightClientKitTests/utils/Stubs.swift b/ZcashLightClientKitTests/utils/Stubs.swift index 95927589..90b78677 100644 --- a/ZcashLightClientKitTests/utils/Stubs.swift +++ b/ZcashLightClientKitTests/utils/Stubs.swift @@ -81,6 +81,10 @@ class MockRustBackend: ZcashRustBackendWelding { false } + static func deriveTransparentPrivateKeyFromSeed(seed: [UInt8]) throws -> String? { + nil + } + static func initAccountsTable(dbData: URL, exfvks: [String]) throws -> Bool { false }