interface LedgerDSLInterpreter<out T : TransactionDSLInterpreter> : Verifies, OutputStateLookupThis interface defines the bare bone functionality that a Ledger DSL interpreter should implement.
TODO (Kotlin 1.1): Use type synonyms to make the type params less unwieldy
| _transaction |
abstract fun _transaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TransactionDSL<T>.() -> EnforceVerifyOrFail): WireTransactionCreates and adds a transaction to the ledger. |
| _unverifiedTransaction |
abstract fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TransactionDSL<T>.() -> Unit): WireTransactionCreates and adds a transaction to the ledger that will not be verified by verifies. |
| attachment |
abstract fun attachment(attachment: InputStream): SecureHashAdds an attachment to the ledger. |
| tweak |
abstract fun tweak(dsl: LedgerDSL<T, LedgerDSLInterpreter<T>>.() -> Unit): UnitCreates a local scoped copy of the ledger. |
| fails |
open fun fails(): EnforceVerifyOrFailAsserts that verifies throws, with no condition on the exception message. |
| fails with |
open infix fun fails with(msg: String): EnforceVerifyOrFail |
| failsWith |
open fun failsWith(expectedMessage: String?): EnforceVerifyOrFailAsserts that verifies() throws. |
| retrieveOutputStateAndRef |
abstract fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S>Retrieves an output previously defined by TransactionDSLInterpreter._output with a label passed in. |
| verifies |
abstract fun verifies(): EnforceVerifyOrFailVerifies the ledger/transaction, throws if the verification fails. |
| ledger |
fun LedgerDSLInterpreter<TransactionDSLInterpreter>. |
| LedgerDSL |
class LedgerDSL<out T : TransactionDSLInterpreter, out L : LedgerDSLInterpreter<T>> : LedgerDSLInterpreter<TransactionDSLInterpreter>This is the class that defines the syntactic sugar of the ledger Test DSL and delegates to the contained interpreter,
and what is actually used in |
| TestLedgerDSLInterpreter |
data class TestLedgerDSLInterpreter : LedgerDSLInterpreter<TestTransactionDSLInterpreter> |