Expand description
Mock implementation of rs-dapi-client for testing
rs-dapi-client provides mocks feature that makes it possible to mock the transport layer.
Core concept of the mocks is a MockDapiClient that mimics DapiClient behavior and allows
to define expectations for requests and responses using MockDapiClient::expect function.
In order to use the mocking feature, you need to:
- Define your requests and responses.
- Create a MockDapiClient and use it instead of DapiClient in your tests.
See tests/mock_dapi_client.rs for an example.
Structs§
- Key
- Unique identifier of some serializable object (e.g. request) that can be used as a key in a hashmap.
- Mock
Dapi Client - Mock DAPI client.
Enums§
- Mock
Error - Mock errors
Traits§
- From
Inner - Create full wrapping object from inner type, using defaults for fields that cannot be derived from the inner type.
Type Aliases§
- Mock
Result - Result of executing a mock request