PACKAGE
rell.test
On this page
The rell.test namespace is only accessible within test modules
Example
Rell
@test module;
function test() {
rell.test.block().run();
}Types
- block
- A test block builder; i.e. a builder for test
- failure
- A test failure, with a message that gives the reason for the failure.
- keypair
- A keypair for testing only.
- op
- A test operation call, consisting of a name (an operation's mount name), and a list of arguments
- tx
- A test transaction builder; i.e. a builder for test
Functions
- assert_equals
- Assert two values are equal.
- assert_events
- Assert that the given events were emitted during the construction of the last block, in the
- assert_fails
- Asserts a function fails; i.e. throws an exception.
- assert_false
- Assert a value is false.
- assert_ge
- Assert that a value is greater than or equal to a given lower bound.
- assert_ge_le
- Assert that a value falls within given bounds.
- assert_ge_lt
- Assert that a value falls within given bounds.
- assert_gt
- Assert that a value is greater than a given lower bound.
- assert_gt_le
- Assert that a value falls within given bounds.
- assert_gt_lt
- Assert that a value falls within given bounds.
- assert_le
- Assert that a value is less than or equal to a given upper bound.
- assert_lt
- Assert that a value is less than a given upper bound.
- assert_not_equals
- Assert two values are unequal.
- assert_not_null
- Assert a value is not null.
- assert_null
- Assert a value is null.
- assert_true
- Assert a value is true.
- get_events
- Get all events that were emitted during the construction of the last block.
- nop
- Create a no-op test operation call.
- set_block_interval
- Set the time interval between future blocks in the blockchain, in milliseconds.
- set_next_block_time
- Set the timestamp that the next block will have, once built, in milliseconds.
- set_next_block_time_delta
- Set the timestamp that the next block will have, once built, relative to the previous block, in
Properties
- DEFAULT_FIRST_BLOCK_TIME
- The default value for the timestamp of the first block in the blockchain, in milliseconds. Equal to
- DEFAULT_BLOCK_INTERVAL
- The default value for the time interval between each block in the blockchain, in milliseconds.
- last_block_time
- The timestamp of the most recently built block in the blockchain, in milliseconds.
- last_block_time_or_null
- The timestamp of the most recently built block in the blockchain, in milliseconds.
- next_block_time
- The timestamp that the next block will have, once built, in milliseconds.
- block_interval
- The time interval that will be used to determine the time of the next block to be built.
- BLOCKCHAIN_SIGNER_KEYPAIR
- The test keypair used to sign all blocks built in the test context.