corda / net.corda.testing.dsl / TestLedgerDSLInterpreter

TestLedgerDSLInterpreter

data class TestLedgerDSLInterpreter : LedgerDSLInterpreter<TestTransactionDSLInterpreter>

Exceptions

TypeMismatch

class TypeMismatch : Exception

VerifiesFailed

class VerifiesFailed : Exception

Constructors

<init>

TestLedgerDSLInterpreter(services: <ERROR CLASS>)

Properties

services

val services: <ERROR CLASS>

transactionsToVerify

val transactionsToVerify: List<<ERROR CLASS>>

transactionsUnverified

val transactionsUnverified: List<<ERROR CLASS>>

wireTransactions

val wireTransactions: List<<ERROR CLASS>>

Functions

_transaction

fun _transaction(transactionLabel: String?, transactionBuilder: <ERROR CLASS>, dsl: TestTransactionDSLInterpreter.() -> EnforceVerifyOrFail): <ERROR CLASS>

Creates and adds a transaction to the ledger.

_tweak

fun _tweak(dsl: LedgerDSLInterpreter<TestTransactionDSLInterpreter>.() -> Unit): Unit

Creates a local scoped copy of the ledger.

_unverifiedTransaction

fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: <ERROR CLASS>, dsl: TestTransactionDSLInterpreter.() -> Unit): <ERROR CLASS>

Creates and adds a transaction to the ledger that will not be verified by verifies.

attachment

fun attachment(attachment: InputStream): <ERROR CLASS>

Adds an attachment to the ledger.

outputToLabel

fun outputToLabel(state: <ERROR CLASS>): String?

retrieveOutputStateAndRef

fun <S> retrieveOutputStateAndRef(clazz: Class<S>, label: String): <ERROR CLASS><S>

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

transactionName

fun transactionName(transactionHash: <ERROR CLASS>): String?

verifies

fun verifies(): EnforceVerifyOrFail

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