diff --git a/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt b/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt index e2ef5a7a95..366abea97f 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt @@ -286,6 +286,14 @@ class TransactionGroupDSL(private val stateType: Class) { } rootTxns.add(wtx) } + + @Deprecated("Does not nest ", level = DeprecationLevel.ERROR) + fun roots(body: Roots.() -> Unit) { + } + + @Deprecated("Use the vararg form of transaction inside roots", level = DeprecationLevel.ERROR) + fun transaction(body: WireTransactionDSL.() -> Unit) { + } } fun roots(body: Roots.() -> Unit) = Roots().apply { body() } @@ -306,6 +314,10 @@ class TransactionGroupDSL(private val stateType: Class) { fun labelForTransaction(tx: WireTransaction): String? = txnToLabelMap[tx.id] fun labelForTransaction(tx: LedgerTransaction): String? = txnToLabelMap[tx.id] + @Deprecated("Does not nest ", level = DeprecationLevel.ERROR) + fun transactionGroup(body: TransactionGroupDSL.() -> Unit) { + } + fun toTransactionGroup() = TransactionGroup( txns.map { it.toLedgerTransaction(MOCK_IDENTITY_SERVICE, MockStorageService().attachments) }.toSet(), rootTxns.map { it.toLedgerTransaction(MOCK_IDENTITY_SERVICE, MockStorageService().attachments) }.toSet()