Structs§
- MockApi
- Zero-pads all human addresses to make them fit the canonical_length and trims off zeros for the reverse operation. This is not really smart, but allows us to see a difference (and consistent length for canonical addresses).
- Mock
Instance Options - Mock
Querier - MockQuerier holds an immutable table of bank balances
- Mock
Storage
Constants§
Functions§
- execute
- instantiate
- Mimics the call signature of the smart contracts. Thus it moves env and msg rather than take them as reference. This is inefficient here, but only used in test code.
- migrate
- migrate_
with_ info - mock_
backend - All external requirements that can be injected for unit tests. It sets the given balance for the contract itself, nothing else
- mock_
backend_ 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_
info - Just set sender and funds for the message. This is intended for use in test code only.
- mock_
instance - mock_
instance_ options - Creates InstanceOptions for testing
- mock_
instance_ with_ balances - mock_
instance_ with_ failing_ api - mock_
instance_ with_ gas_ limit - Creates an instance from the given Wasm bytecode. The gas limit is measured in CosmWasm gas.
- mock_
instance_ with_ options - query
- reply
- sudo
- test_io
- Runs a series of IO tests, hammering especially on allocate and deallocate. This could be especially useful when run with some kind of leak detector.