mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
docs: Rename test tutorial subtitle
This commit is contained in:
parent
e13a95857a
commit
d0903ae265
@ -131,7 +131,7 @@ data class TestTransactionDSLInterpreter private constructor(
|
||||
override fun _output(label: String?, notary: Party, contractState: ContractState) {
|
||||
val outputIndex = transactionBuilder.addOutputState(contractState, notary)
|
||||
if (label != null) {
|
||||
if (labelToIndexMap.contains(label)) {
|
||||
if (label in labelToIndexMap) {
|
||||
throw DuplicateOutputLabel(label)
|
||||
} else {
|
||||
labelToIndexMap[label] = outputIndex
|
||||
@ -284,7 +284,7 @@ data class TestLedgerDSLInterpreter private constructor (
|
||||
val wireTransaction = transactionInterpreter.toWireTransaction()
|
||||
// Record the output states
|
||||
transactionInterpreter.labelToIndexMap.forEach { label, index ->
|
||||
if (labelToOutputStateAndRefs.contains(label)) {
|
||||
if (label in labelToOutputStateAndRefs) {
|
||||
throw DuplicateOutputLabel(label)
|
||||
}
|
||||
labelToOutputStateAndRefs[label] = wireTransaction.outRef(index)
|
||||
@ -355,7 +355,7 @@ fun signAll(transactionsToSign: List<WireTransaction>, extraKeys: Array<out KeyP
|
||||
require(bits == wtx.serialized)
|
||||
val signatures = ArrayList<DigitalSignature.WithKey>()
|
||||
for (key in ALL_TEST_KEYS + extraKeys) {
|
||||
if (allPubKeys.contains(key.public)) {
|
||||
if (key.public in allPubKeys) {
|
||||
signatures += key.signWithECDSA(bits)
|
||||
allPubKeys -= key.public
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ This tutorial will take you through the steps required to write a contract test
|
||||
The testing DSL allows one to define a piece of the ledger with transactions referring to each other, and ways of
|
||||
verifying their correctness.
|
||||
|
||||
Start with the basic Bird-fold
|
||||
------------------------------
|
||||
Testing single transactions
|
||||
---------------------------
|
||||
|
||||
We start with the empty ledger:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user