interface LedgerDSLInterpreter<out T : TransactionDSLInterpreter> : Verifies, OutputStateLookup
This 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
abstract fun _transaction(transactionLabel: String?, transactionBuilder: <ERROR CLASS>, dsl: T.() -> EnforceVerifyOrFail): <ERROR CLASS>
Creates and adds a transaction to the ledger. |
|
abstract fun _tweak(dsl: LedgerDSLInterpreter<T>.() -> Unit): Unit
Creates a local scoped copy of the ledger. |
|
abstract fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: <ERROR CLASS>, dsl: T.() -> Unit): <ERROR CLASS>
Creates and adds a transaction to the ledger that will not be verified by verifies. |
|
abstract fun attachment(attachment: InputStream): <ERROR CLASS>
Adds an attachment to the ledger. |
open fun fails(): EnforceVerifyOrFail
Asserts that verifies throws, with no condition on the exception message. |
|
open infix fun fails with(msg: String): EnforceVerifyOrFail |
|
open fun failsWith(expectedMessage: String?): EnforceVerifyOrFail
Asserts that verifies() throws. |
|
abstract fun <S> retrieveOutputStateAndRef(clazz: Class<S>, label: String): <ERROR CLASS><S>
Retrieves an output previously defined by TransactionDSLInterpreter.output with a label passed in. |
|
abstract fun verifies(): EnforceVerifyOrFail
Verifies the ledger/transaction, throws if the verification fails. |
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 |
|
data class TestLedgerDSLInterpreter : LedgerDSLInterpreter<TestTransactionDSLInterpreter> |