com.r3corda.core.testing / TestLedgerDSLInterpreter

TestLedgerDSLInterpreter

data class TestLedgerDSLInterpreter : LedgerDSLInterpreter<TestTransactionDSLInterpreter>


Exceptions

TypeMismatch class TypeMismatch : Exception
VerifiesFailed class VerifiesFailed : Exception

Constructors

<init> TestLedgerDSLInterpreter(identityService: IdentityService, storageService: StorageService)

Properties

wireTransactions val wireTransactions: List<WireTransaction>

Functions

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

Creates and adds a transaction to the ledger.

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

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

attachment fun attachment(attachment: InputStream): SecureHash

Adds an attachment to the ledger.

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

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

toTransactionGroup fun toTransactionGroup(): TransactionGroup
transactionName fun transactionName(transactionHash: SecureHash): String?
tweak fun tweak(dsl: LedgerDSL<TestTransactionDSLInterpreter, LedgerDSLInterpreter<TestTransactionDSLInterpreter>>.() -> Unit): Unit

Creates a local scoped copy of the ledger.

verifies fun verifies(): EnforceVerifyOrFail

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

Extension Functions

ledger fun LedgerDSLInterpreter<TransactionDSLInterpreter>.ledger(dsl: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>.() -> Unit): Unit