|
| 1 | +// Generated using Sourcery 2.2.5 — https://github.com/krzysztofzablocki/Sourcery |
| 2 | +// DO NOT EDIT |
| 3 | +// swiftlint:disable all |
| 4 | + |
| 5 | +import UIKit |
| 6 | +import SSFModels |
| 7 | +@testable import fearless |
| 8 | + |
| 9 | +public class BalanceLocksFetchingMock: BalanceLocksFetching { |
| 10 | +public init() {} |
| 11 | + |
| 12 | + //MARK: - fetchStakingLocks |
| 13 | + |
| 14 | + public var fetchStakingLocksForThrowableError: Error? |
| 15 | + public var fetchStakingLocksForCallsCount = 0 |
| 16 | + public var fetchStakingLocksForCalled: Bool { |
| 17 | + return fetchStakingLocksForCallsCount > 0 |
| 18 | + } |
| 19 | + public var fetchStakingLocksForReceivedAccountId: AccountId? |
| 20 | + public var fetchStakingLocksForReceivedInvocations: [AccountId] = [] |
| 21 | + public var fetchStakingLocksForReturnValue: StakingLocks! |
| 22 | + public var fetchStakingLocksForClosure: ((AccountId) throws -> StakingLocks)? |
| 23 | + |
| 24 | + public func fetchStakingLocks(for accountId: AccountId) throws -> StakingLocks { |
| 25 | + if let error = fetchStakingLocksForThrowableError { |
| 26 | + throw error |
| 27 | + } |
| 28 | + fetchStakingLocksForCallsCount += 1 |
| 29 | + fetchStakingLocksForReceivedAccountId = accountId |
| 30 | + fetchStakingLocksForReceivedInvocations.append(accountId) |
| 31 | + return try fetchStakingLocksForClosure.map({ try $0(accountId) }) ?? fetchStakingLocksForReturnValue |
| 32 | + } |
| 33 | + |
| 34 | + //MARK: - fetchNominationPoolLocks |
| 35 | + |
| 36 | + public var fetchNominationPoolLocksForThrowableError: Error? |
| 37 | + public var fetchNominationPoolLocksForCallsCount = 0 |
| 38 | + public var fetchNominationPoolLocksForCalled: Bool { |
| 39 | + return fetchNominationPoolLocksForCallsCount > 0 |
| 40 | + } |
| 41 | + public var fetchNominationPoolLocksForReceivedAccountId: AccountId? |
| 42 | + public var fetchNominationPoolLocksForReceivedInvocations: [AccountId] = [] |
| 43 | + public var fetchNominationPoolLocksForReturnValue: StakingLocks! |
| 44 | + public var fetchNominationPoolLocksForClosure: ((AccountId) throws -> StakingLocks)? |
| 45 | + |
| 46 | + public func fetchNominationPoolLocks(for accountId: AccountId) throws -> StakingLocks { |
| 47 | + if let error = fetchNominationPoolLocksForThrowableError { |
| 48 | + throw error |
| 49 | + } |
| 50 | + fetchNominationPoolLocksForCallsCount += 1 |
| 51 | + fetchNominationPoolLocksForReceivedAccountId = accountId |
| 52 | + fetchNominationPoolLocksForReceivedInvocations.append(accountId) |
| 53 | + return try fetchNominationPoolLocksForClosure.map({ try $0(accountId) }) ?? fetchNominationPoolLocksForReturnValue |
| 54 | + } |
| 55 | + |
| 56 | + //MARK: - fetchGovernanceLocks |
| 57 | + |
| 58 | + public var fetchGovernanceLocksForThrowableError: Error? |
| 59 | + public var fetchGovernanceLocksForCallsCount = 0 |
| 60 | + public var fetchGovernanceLocksForCalled: Bool { |
| 61 | + return fetchGovernanceLocksForCallsCount > 0 |
| 62 | + } |
| 63 | + public var fetchGovernanceLocksForReceivedAccountId: AccountId? |
| 64 | + public var fetchGovernanceLocksForReceivedInvocations: [AccountId] = [] |
| 65 | + public var fetchGovernanceLocksForReturnValue: Decimal! |
| 66 | + public var fetchGovernanceLocksForClosure: ((AccountId) throws -> Decimal)? |
| 67 | + |
| 68 | + public func fetchGovernanceLocks(for accountId: AccountId) throws -> Decimal { |
| 69 | + if let error = fetchGovernanceLocksForThrowableError { |
| 70 | + throw error |
| 71 | + } |
| 72 | + fetchGovernanceLocksForCallsCount += 1 |
| 73 | + fetchGovernanceLocksForReceivedAccountId = accountId |
| 74 | + fetchGovernanceLocksForReceivedInvocations.append(accountId) |
| 75 | + return try fetchGovernanceLocksForClosure.map({ try $0(accountId) }) ?? fetchGovernanceLocksForReturnValue |
| 76 | + } |
| 77 | + |
| 78 | + //MARK: - fetchCrowdloanLocks |
| 79 | + |
| 80 | + public var fetchCrowdloanLocksForThrowableError: Error? |
| 81 | + public var fetchCrowdloanLocksForCallsCount = 0 |
| 82 | + public var fetchCrowdloanLocksForCalled: Bool { |
| 83 | + return fetchCrowdloanLocksForCallsCount > 0 |
| 84 | + } |
| 85 | + public var fetchCrowdloanLocksForReceivedAccountId: AccountId? |
| 86 | + public var fetchCrowdloanLocksForReceivedInvocations: [AccountId] = [] |
| 87 | + public var fetchCrowdloanLocksForReturnValue: Decimal! |
| 88 | + public var fetchCrowdloanLocksForClosure: ((AccountId) throws -> Decimal)? |
| 89 | + |
| 90 | + public func fetchCrowdloanLocks(for accountId: AccountId) throws -> Decimal { |
| 91 | + if let error = fetchCrowdloanLocksForThrowableError { |
| 92 | + throw error |
| 93 | + } |
| 94 | + fetchCrowdloanLocksForCallsCount += 1 |
| 95 | + fetchCrowdloanLocksForReceivedAccountId = accountId |
| 96 | + fetchCrowdloanLocksForReceivedInvocations.append(accountId) |
| 97 | + return try fetchCrowdloanLocksForClosure.map({ try $0(accountId) }) ?? fetchCrowdloanLocksForReturnValue |
| 98 | + } |
| 99 | + |
| 100 | + //MARK: - fetchVestingLocks |
| 101 | + |
| 102 | + public var fetchVestingLocksForCurrencyIdThrowableError: Error? |
| 103 | + public var fetchVestingLocksForCurrencyIdCallsCount = 0 |
| 104 | + public var fetchVestingLocksForCurrencyIdCalled: Bool { |
| 105 | + return fetchVestingLocksForCurrencyIdCallsCount > 0 |
| 106 | + } |
| 107 | + public var fetchVestingLocksForCurrencyIdReceivedArguments: (accountId: AccountId, currencyId: CurrencyId?)? |
| 108 | + public var fetchVestingLocksForCurrencyIdReceivedInvocations: [(accountId: AccountId, currencyId: CurrencyId?)] = [] |
| 109 | + public var fetchVestingLocksForCurrencyIdReturnValue: Decimal! |
| 110 | + public var fetchVestingLocksForCurrencyIdClosure: ((AccountId, CurrencyId?) throws -> Decimal)? |
| 111 | + |
| 112 | + public func fetchVestingLocks(for accountId: AccountId, currencyId: CurrencyId?) throws -> Decimal { |
| 113 | + if let error = fetchVestingLocksForCurrencyIdThrowableError { |
| 114 | + throw error |
| 115 | + } |
| 116 | + fetchVestingLocksForCurrencyIdCallsCount += 1 |
| 117 | + fetchVestingLocksForCurrencyIdReceivedArguments = (accountId: accountId, currencyId: currencyId) |
| 118 | + fetchVestingLocksForCurrencyIdReceivedInvocations.append((accountId: accountId, currencyId: currencyId)) |
| 119 | + return try fetchVestingLocksForCurrencyIdClosure.map({ try $0(accountId, currencyId) }) ?? fetchVestingLocksForCurrencyIdReturnValue |
| 120 | + } |
| 121 | + |
| 122 | + //MARK: - fetchTotalLocks |
| 123 | + |
| 124 | + public var fetchTotalLocksForCurrencyIdThrowableError: Error? |
| 125 | + public var fetchTotalLocksForCurrencyIdCallsCount = 0 |
| 126 | + public var fetchTotalLocksForCurrencyIdCalled: Bool { |
| 127 | + return fetchTotalLocksForCurrencyIdCallsCount > 0 |
| 128 | + } |
| 129 | + public var fetchTotalLocksForCurrencyIdReceivedArguments: (accountId: AccountId, currencyId: CurrencyId?)? |
| 130 | + public var fetchTotalLocksForCurrencyIdReceivedInvocations: [(accountId: AccountId, currencyId: CurrencyId?)] = [] |
| 131 | + public var fetchTotalLocksForCurrencyIdReturnValue: Decimal! |
| 132 | + public var fetchTotalLocksForCurrencyIdClosure: ((AccountId, CurrencyId?) throws -> Decimal)? |
| 133 | + |
| 134 | + public func fetchTotalLocks(for accountId: AccountId, currencyId: CurrencyId?) throws -> Decimal { |
| 135 | + if let error = fetchTotalLocksForCurrencyIdThrowableError { |
| 136 | + throw error |
| 137 | + } |
| 138 | + fetchTotalLocksForCurrencyIdCallsCount += 1 |
| 139 | + fetchTotalLocksForCurrencyIdReceivedArguments = (accountId: accountId, currencyId: currencyId) |
| 140 | + fetchTotalLocksForCurrencyIdReceivedInvocations.append((accountId: accountId, currencyId: currencyId)) |
| 141 | + return try fetchTotalLocksForCurrencyIdClosure.map({ try $0(accountId, currencyId) }) ?? fetchTotalLocksForCurrencyIdReturnValue |
| 142 | + } |
| 143 | + |
| 144 | + //MARK: - fetchAssetLocks |
| 145 | + |
| 146 | + public var fetchAssetLocksForCurrencyIdThrowableError: Error? |
| 147 | + public var fetchAssetLocksForCurrencyIdCallsCount = 0 |
| 148 | + public var fetchAssetLocksForCurrencyIdCalled: Bool { |
| 149 | + return fetchAssetLocksForCurrencyIdCallsCount > 0 |
| 150 | + } |
| 151 | + public var fetchAssetLocksForCurrencyIdReceivedArguments: (accountId: AccountId, currencyId: CurrencyId?)? |
| 152 | + public var fetchAssetLocksForCurrencyIdReceivedInvocations: [(accountId: AccountId, currencyId: CurrencyId?)] = [] |
| 153 | + public var fetchAssetLocksForCurrencyIdReturnValue: Decimal! |
| 154 | + public var fetchAssetLocksForCurrencyIdClosure: ((AccountId, CurrencyId?) throws -> Decimal)? |
| 155 | + |
| 156 | + public func fetchAssetLocks(for accountId: AccountId, currencyId: CurrencyId?) throws -> Decimal { |
| 157 | + if let error = fetchAssetLocksForCurrencyIdThrowableError { |
| 158 | + throw error |
| 159 | + } |
| 160 | + fetchAssetLocksForCurrencyIdCallsCount += 1 |
| 161 | + fetchAssetLocksForCurrencyIdReceivedArguments = (accountId: accountId, currencyId: currencyId) |
| 162 | + fetchAssetLocksForCurrencyIdReceivedInvocations.append((accountId: accountId, currencyId: currencyId)) |
| 163 | + return try fetchAssetLocksForCurrencyIdClosure.map({ try $0(accountId, currencyId) }) ?? fetchAssetLocksForCurrencyIdReturnValue |
| 164 | + } |
| 165 | + |
| 166 | + //MARK: - fetchAssetFrozen |
| 167 | + |
| 168 | + public var fetchAssetFrozenForCurrencyIdThrowableError: Error? |
| 169 | + public var fetchAssetFrozenForCurrencyIdCallsCount = 0 |
| 170 | + public var fetchAssetFrozenForCurrencyIdCalled: Bool { |
| 171 | + return fetchAssetFrozenForCurrencyIdCallsCount > 0 |
| 172 | + } |
| 173 | + public var fetchAssetFrozenForCurrencyIdReceivedArguments: (accountId: AccountId, currencyId: CurrencyId?)? |
| 174 | + public var fetchAssetFrozenForCurrencyIdReceivedInvocations: [(accountId: AccountId, currencyId: CurrencyId?)] = [] |
| 175 | + public var fetchAssetFrozenForCurrencyIdReturnValue: Decimal! |
| 176 | + public var fetchAssetFrozenForCurrencyIdClosure: ((AccountId, CurrencyId?) throws -> Decimal)? |
| 177 | + |
| 178 | + public func fetchAssetFrozen(for accountId: AccountId, currencyId: CurrencyId?) throws -> Decimal { |
| 179 | + if let error = fetchAssetFrozenForCurrencyIdThrowableError { |
| 180 | + throw error |
| 181 | + } |
| 182 | + fetchAssetFrozenForCurrencyIdCallsCount += 1 |
| 183 | + fetchAssetFrozenForCurrencyIdReceivedArguments = (accountId: accountId, currencyId: currencyId) |
| 184 | + fetchAssetFrozenForCurrencyIdReceivedInvocations.append((accountId: accountId, currencyId: currencyId)) |
| 185 | + return try fetchAssetFrozenForCurrencyIdClosure.map({ try $0(accountId, currencyId) }) ?? fetchAssetFrozenForCurrencyIdReturnValue |
| 186 | + } |
| 187 | + |
| 188 | + //MARK: - fetchAssetBlocked |
| 189 | + |
| 190 | + public var fetchAssetBlockedForCurrencyIdThrowableError: Error? |
| 191 | + public var fetchAssetBlockedForCurrencyIdCallsCount = 0 |
| 192 | + public var fetchAssetBlockedForCurrencyIdCalled: Bool { |
| 193 | + return fetchAssetBlockedForCurrencyIdCallsCount > 0 |
| 194 | + } |
| 195 | + public var fetchAssetBlockedForCurrencyIdReceivedArguments: (accountId: AccountId, currencyId: CurrencyId?)? |
| 196 | + public var fetchAssetBlockedForCurrencyIdReceivedInvocations: [(accountId: AccountId, currencyId: CurrencyId?)] = [] |
| 197 | + public var fetchAssetBlockedForCurrencyIdReturnValue: Decimal! |
| 198 | + public var fetchAssetBlockedForCurrencyIdClosure: ((AccountId, CurrencyId?) throws -> Decimal)? |
| 199 | + |
| 200 | + public func fetchAssetBlocked(for accountId: AccountId, currencyId: CurrencyId?) throws -> Decimal { |
| 201 | + if let error = fetchAssetBlockedForCurrencyIdThrowableError { |
| 202 | + throw error |
| 203 | + } |
| 204 | + fetchAssetBlockedForCurrencyIdCallsCount += 1 |
| 205 | + fetchAssetBlockedForCurrencyIdReceivedArguments = (accountId: accountId, currencyId: currencyId) |
| 206 | + fetchAssetBlockedForCurrencyIdReceivedInvocations.append((accountId: accountId, currencyId: currencyId)) |
| 207 | + return try fetchAssetBlockedForCurrencyIdClosure.map({ try $0(accountId, currencyId) }) ?? fetchAssetBlockedForCurrencyIdReturnValue |
| 208 | + } |
| 209 | + |
| 210 | +} |
0 commit comments