ZcashLightClientKit/Tests/NetworkTests
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
..
BlockScanTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
BlockStreamingTest.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
CompactBlockProcessorTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
CompactBlockReorgTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
DownloadTests.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
LightWalletServiceTests.swift [#901] Use fulfillment instead of wait in async context in tests 2023-05-01 09:07:43 +02:00