op

type op

A test operation call, consisting of a name (an operation's mount name), and a list of arguments (a list<gtv>).

Since

0.10.4

See also

Constructors

Link copied to clipboard
constructor(name: text, args: list<gtv>)

Construct a new test operation call from the given operation name and argument list.

constructor(name: text, args: gtv...)

Construct a new test operation call from the given operation name and arguments.

Properties

Link copied to clipboard
val args: list<gtv>

The arguments passed to the operation in this test operation call.

Link copied to clipboard
val name: text

The name of operation called by this test operation call.

Functions

Link copied to clipboard
function run()

Build a test block containing a single test transaction, which contains only this test operation call.

Link copied to clipboard

Assert that this test operation call fails.

More precisely:

  1. Build a test block containing a single test transaction, which contains only this test operation call.

  2. Assert that the building fails (i.e. that invoking this test transaction call results in a thrown exception).

function run_must_fail(expected_message: text): rell.test.failure

Assert that this test operation call fails.

More precisely:

  1. Build a test block containing a single test transaction, which contains only this test operation call.

  2. Assert that the building fails (i.e. that invoking this test transaction call results in a thrown exception).

Checks that the given message is a substring of the thrown message. For example my_tx.run_must_fail('out of bounds') succeeds if an exception with message Run-time error: List index out of bounds: 0 (size 0) is thrown.

Link copied to clipboard
function sign(privkeys: byte_array...): rell.test.tx

Create a test transaction builder containing this test operation call, and add the given private keys as signers of the test transaction.

When the test transaction builder is built, the transaction will be signed with all given private keys.

function sign(privkeys: list<byte_array>): rell.test.tx

Create a test transaction builder containing this test operation call, and add the private keys in the given list as signers of the test transaction.

When the returned test transaction builder is built, the transaction will be signed with all private keys in the list.

function sign(keypairs: list<rell.test.keypair>): rell.test.tx

Create a test transaction builder containing this test operation call, and add the keypairs in the given list as signers of the test transaction.

When the returned test transaction builder is built, the transaction will be signed with all keypairs in the list.

function sign(keypairs: rell.test.keypair...): rell.test.tx

Create a test transaction builder containing this test operation call, and add the given keypairs as signers of the test transaction.

When the returned test transaction builder is built, the transaction will be signed with all given keypairs.

Link copied to clipboard

Convert this test operation call to a gtx_operation.

Inverse of gtx_operation.to_test_op().

Link copied to clipboard
function tx(): rell.test.tx

Create a test transaction builder containing this test operation call.