ZcashLightClientKit/Tests/OfflineTests
Michal Fousek 5d2b2298b5 [#1012] Introduce dependency injection in the SDK
Closes #1012

- This is the first change for the dependency injection. This change
  adds `DIContainer` which is used to register and resolve dependencies.
- Then this change shows how `DIContainer` can be used to resolve
  dependencies. And it also shows how to mock dependencies in tests.
- Constructors of `Initializer` are changed to support mocking of
  depedendencies. But it doesn't affect public API in any way.
- Depedencies are registered in `Dependencies.setup()`. Then in the code
  `container.resolve(SomeType.self)` is called to get instance of the
  dependency.
- `ZcashTestCase` class is added. It inherits from `XCTestCase` and
  should be used for base class in tests. `ZcashTestCase` takes care of
  creation of `DIContainer` for dependencies mocking. In future we can
  maybe move there more things that are used in each test.
- Lot is missing here. Not all the code is using dependency injection.
  Tests for `DIContainer` are missing. Only `OfflineTests` work now
  (other tests can't be even compiled). It will be added in future
  changes.
2023-05-08 14:58:49 +02:00
..
DerivationToolTests Make all methods in ZcashKeyDerivationBackendWelding non async 2023-04-25 16:16:04 +02:00
BirthdayTests.swift [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
BlockBatchValidationTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
ClosureSynchronizerOfflineTests.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
CombineSynchronizerOfflineTests.swift Fix tests related to blocks downloading 2023-05-08 11:08:54 +02:00
CompactBlockProcessorOfflineTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
CompactBlockRepositoryTests.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
FsBlockStorageTests.swift [#442] Introduce parallel downloading and scanning 2023-05-05 09:35:43 +02:00
InitializerOfflineTests.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
InternalSyncProgressTests.swift [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
MemoTests.swift [#778] Add swiflint config file only for tests 2023-02-13 13:36:58 +01:00
NullBytesTests.swift [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
PagedTransactionRepositoryTests.swift [#484] Use async for TransactionsRepository 2023-03-28 10:17:14 +02:00
RawTransactionTests.swift [#796] Fix tests 2023-02-16 17:14:31 +01:00
RecipientTests.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
SynchronizerOfflineTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
TransactionRepositoryTests.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
TxIdTests.swift [#778] Add swiflint config file only for tests 2023-02-13 13:36:58 +01:00
UndescribableTests.swift [#778] Add swiflint config file only for tests 2023-02-13 13:36:58 +01:00
UnifiedTypecodesTests.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
WalletTests.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
ZatoshiTests.swift Fix typos 2022-12-31 12:50:16 +02:00
ZcashRustBackendTests.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
ZcashTransactionStateTests.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
Zip302MemoTests.swift [#442] Introduce parallel downloading and scanning 2023-05-05 09:35:43 +02:00