Documentation
¶
Overview ¶
Package testrings provides helper functions for constructing real (e.g. localnet) and mock RingClient objects with pre-configured and/or parameterized call arguments, return value(s), and/or expectations thereof. Intended for use in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRingClientWithMockDependencies ¶ added in v0.0.14
func NewRingClientWithMockDependencies( ctx context.Context, t *testing.T, deps depinject.Config, ) crypto.RingClient
NewRingClientWithMockDependencies creates a new "real" RingClient with the the necessary queriers injected via dependencies. The queriers are expected to maintain their respective mocked states:
- Account querier: the account addresses and public keys
- Application querier: the application addresses delegatee gateway addresses
See:
testutil/testclient/testqueryclients/accquerier.go testutil/testclient/testqueryclients/appquerier.go testutil/testclient/testdelegation/client.go
for methods to create these queriers and maintain their states.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.