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: ServiceHub)

Properties

services

val services: ServiceHub

transactionsToVerify

val transactionsToVerify: List<WireTransaction>

transactionsUnverified

val transactionsUnverified: List<WireTransaction>

wireTransactions

val wireTransactions: List<WireTransaction>

Functions

_transaction

Creates and adds a transaction to the ledger.

fun _transaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TestTransactionDSLInterpreter.() -> EnforceVerifyOrFail): WireTransaction

_tweak

Creates a local scoped copy of the ledger.

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

_unverifiedTransaction

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

fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TestTransactionDSLInterpreter.() -> Unit): WireTransaction

attachment

Adds an attachment to the ledger.

fun attachment(attachment: InputStream): SecureHash

outputToLabel

fun outputToLabel(state: ContractState): String?

retrieveOutputStateAndRef

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

fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S>

transactionName

fun transactionName(transactionHash: SecureHash): String?

verifies

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

fun verifies(): EnforceVerifyOrFail