Expand description
Exposed for testing only Both unit tests and integration tests are compiled to native code, so everything in here does not need to compile to Wasm.
Re-exports§
pub use assertions::assert_approx_eq_impl;
Structs§
- Bank
Querier - Distribution
Querier - MockApi
- Mock
Querier - MockQuerier holds an immutable table of bank balances and configurable handlers for Wasm queries and custom queries.
- Staking
Querier
Constants§
Functions§
- message_
info - A constructor function for
MessageInfo
. - mock_
dependencies - Creates all external requirements that can be injected for unit tests.
- mock_
dependencies_ with_ balance - Creates all external requirements that can be injected for unit tests.
- mock_
dependencies_ with_ balances - Initializes the querier along with the mock_dependencies. Sets all balances provided (you must explicitly set contract balance if desired).
- mock_
env - Returns a default environment with height, time, chain_id, and contract address. You can submit as is to most contracts, or modify height/time if you want to test for expiration.
- mock_
ibc_ channel - Creates an IbcChannel for testing. You set a few key parameters for handshaking, If you want to set more, use this as a default and mutate other fields
- mock_
ibc_ channel_ close_ confirm - Creates a IbcChannelCloseMsg::CloseConfirm for testing ibc_channel_close.
- mock_
ibc_ channel_ close_ init - Creates a IbcChannelCloseMsg::CloseInit for testing ibc_channel_close.
- mock_
ibc_ channel_ connect_ ack - Creates a IbcChannelConnectMsg::ConnectAck for testing ibc_channel_connect.
- mock_
ibc_ channel_ connect_ confirm - Creates a IbcChannelConnectMsg::ConnectConfirm for testing ibc_channel_connect.
- mock_
ibc_ channel_ open_ init - Creates a IbcChannelOpenMsg::OpenInit for testing ibc_channel_open.
- mock_
ibc_ channel_ open_ try - Creates a IbcChannelOpenMsg::OpenTry for testing ibc_channel_open.
- mock_
ibc_ packet_ ack - Creates a IbcPacketAckMsg for testing ibc_packet_ack. You set a few key parameters that are
often parsed. If you want to set more, use this as a default and mutate other fields.
The difference from mock_ibc_packet_recv is if
my_channel_id
is src or dest. - mock_
ibc_ packet_ recv - Creates a IbcPacketReceiveMsg for testing ibc_packet_receive. You set a few key parameters that are often parsed. If you want to set more, use this as a default and mutate other fields
- mock_
ibc_ packet_ timeout - Creates a IbcPacketTimeoutMsg for testing ibc_packet_timeout. You set a few key parameters that are
often parsed. If you want to set more, use this as a default and mutate other fields.
The difference from mock_ibc_packet_recv is if
my_channel_id
is src or dest. - mock_
info Deprecated - Just set sender and funds for the message. This is intended for use in test code only.
- mock_
wasmd_ attr - Only for test code. This bypasses assertions in new, allowing us to create _* Attributes to simulate responses from the blockchain
Type Aliases§
- Mock
Querier Custom Handler Result - The same type as cosmwasm-std’s QuerierResult, but easier to reuse in cosmwasm-vm. It might diverge from QuerierResult at some point.
- Mock
Storage