ZcashLightClientKit/Sources/ZcashLightClientKit
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
..
Block [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
Constants [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
DAO Fix tests related to blocks downloading 2023-05-08 11:08:54 +02:00
Entity Fix tests related to blocks downloading 2023-05-08 11:08:54 +02:00
Error [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
Extensions [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
Metrics [#209] Add support for multiple instances of the SDKSynchronizer 2023-03-27 20:42:52 +02:00
Model [#1019] Memo has trailing garbled text (#1023) 2023-05-05 15:51:50 -03:00
Modules/Service [#1029] AsyncThrowingStream update so it doesn't use Task 2023-05-08 13:57:31 +02:00
Providers [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
Repository [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
Resources/checkpoints [#985] Release 0.21.0-beta (#986) 2023-04-19 14:32:48 -03:00
Rust Make all methods in ZcashKeyDerivationBackendWelding non async 2023-04-25 16:16:04 +02:00
Synchronizer [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
Tool Make all methods in ZcashKeyDerivationBackendWelding non async 2023-04-25 16:16:04 +02:00
Transaction Fix tests related to blocks downloading 2023-05-08 11:08:54 +02:00
Utils [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
ClosureSynchronizer.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
CombineSynchronizer.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00
Initializer.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
Synchronizer.swift [#1001] Remove PendingDb in favor of `v_transactions` and `v_tx_output` Views (#1001) 2023-05-05 14:30:47 -03:00