Module pallet_message_queue::mock_helpers
source · Expand description
Std setup helpers for testing and benchmarking.
Cannot be put into mock.rs since benchmarks require no-std and mock.rs is std.
Structs
- Processes any message and consumes
(REQUIRED_WEIGHT, REQUIRED_WEIGHT)
weight.
Enums
- Mocked message origin for testing.
Traits
- Converts
Self
into aWeight
by usingSelf
for all components.
Functions
- Assert the last event that was emitted.
- Check that the Ready Ring consists of
queues
in that exact order. - Returns a page filled with empty messages and the number of messages.
- Build a ring with three queues:
Here
,There
andEverywhere(0)
. - Returns a full page of messages with their index as payload and the number of messages.
- Knit a queue into the ready-ring and write it back to storage.
- Create a message from the given data.
- Create a page from a single message.
- Provide a setup for
bump_service_head
. - Unknit a queue into the ready-ring and write it back to storage.