Revert "core: Removed unused deprecated test functions"

This reverts commit 1c09ff86ed6803fcda6c76b6f5e323621c4b0e06.
This commit is contained in:
Andras Slemmer 2016-06-17 13:23:13 +01:00
parent eaf37e2e7a
commit 1f171a1ece

View File

@ -286,6 +286,14 @@ class TransactionGroupDSL<T : ContractState>(private val stateType: Class<T>) {
}
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<T : ContractState>(private val stateType: Class<T>) {
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<T>.() -> Unit) {
}
fun toTransactionGroup() = TransactionGroup(
txns.map { it.toLedgerTransaction(MOCK_IDENTITY_SERVICE, MockStorageService().attachments) }.toSet(),
rootTxns.map { it.toLedgerTransaction(MOCK_IDENTITY_SERVICE, MockStorageService().attachments) }.toSet()