TestTransactionDSLInterpreter

This interpreter builds a transaction, and TransactionDSL.verifies that the resolved transaction is correct. Note that transactions corresponding to input states are not verified. Use LedgerDSL.verifies for that.

Constructors

Link copied to clipboard
constructor(ledgerInterpreter: TestLedgerDSLInterpreter, transactionBuilder: <Error class: unknown class>)

Properties

Link copied to clipboard

A reference to the enclosing ledger{..}'s interpreter.

Link copied to clipboard
val services: <Error class: unknown class>
Link copied to clipboard
val transactionBuilder: <Error class: unknown class>

Functions

Link copied to clipboard
open override fun _attachment(contractClassName: <Error class: unknown class>)
open override fun _attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>, signers: List<PublicKey>)

Attaches an attachment containing the named contract to the transaction

open override fun _attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>, signers: List<PublicKey>, jarManifestAttributes: Map<String, String>)

Attaches an attachment containing the named contract to the transaction.

Link copied to clipboard

Creates a local scoped copy of the transaction.

Link copied to clipboard
open override fun attachment(attachmentId: <Error class: unknown class>)

Adds an Attachment reference to the transaction.

Link copied to clipboard
open override fun command(signers: List<PublicKey>, commandData: <Error class: unknown class>)

Adds a command to the transaction.

Link copied to clipboard

Asserts that verifies throws, with no condition on the exception message.

Link copied to clipboard
open infix fun fails with(msg: String): EnforceVerifyOrFail
Link copied to clipboard
open fun failsWith(expectedMessage: String?): EnforceVerifyOrFail

Asserts that verifies() throws.

Link copied to clipboard
open override fun input(stateRef: <Error class: unknown class>)

Adds an input reference to the transaction. Note that verifies will resolve this reference.

Link copied to clipboard
open override fun output(contractClassName: <Error class: unknown class>, label: String?, notary: <Error class: unknown class>, encumbrance: Int?, attachmentConstraint: <Error class: unknown class>, contractState: <Error class: unknown class>)

Adds an output to the transaction.

Link copied to clipboard
open override fun reference(stateRef: <Error class: unknown class>)

Add a reference input state to the transaction. Note that verifies will resolve this reference.

Link copied to clipboard
open override fun <S> retrieveOutputStateAndRef(clazz: Class<S>, label: String): <Error class: unknown class><S>

Retrieves an output previously defined by TransactionDSLInterpreter.output with a label passed in.

Link copied to clipboard
open override fun timeWindow(data: <Error class: unknown class>)

Sets the time-window of the transaction.

Link copied to clipboard
open override fun verifies(): EnforceVerifyOrFail

Verifies the ledger/transaction, throws if the verification fails.