diff --git a/core/src/main/kotlin/com/r3corda/core/testing/LedgerDSLInterpreter.kt b/core/src/main/kotlin/com/r3corda/core/testing/LedgerDSLInterpreter.kt index 8b6329956e..f86d189324 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/LedgerDSLInterpreter.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/LedgerDSLInterpreter.kt @@ -11,15 +11,15 @@ import java.io.InputStream interface OutputStateLookup { /** * Retrieves an output previously defined by [TransactionDSLInterpreter._output] with a label passed in. - * @param clazz: The class object holding the type of the output state expected. - * @param label: The label of the to-be-retrieved output state - * @return: The output [StateAndRef] + * @param clazz The class object holding the type of the output state expected. + * @param label The label of the to-be-retrieved output state + * @return The output [StateAndRef] */ fun retrieveOutputStateAndRef(clazz: Class, label: String): StateAndRef } /** - * This interface asserts that the DSL at hand is capable of verifying it's underlying construct(ledger/transaction) + * This interface asserts that the DSL at hand is capable of verifying its underlying construct(ledger/transaction) */ interface Verifies { /** @@ -29,7 +29,7 @@ interface Verifies { /** * Asserts that verifies() throws - * @param expectedMessage: An optional string to be searched for in the raised exception. + * @param expectedMessage An optional string to be searched for in the raised exception. */ fun failsWith(expectedMessage: String?): EnforceVerifyOrFail { val exceptionThrown = try { @@ -78,34 +78,34 @@ interface Verifies { interface LedgerDSLInterpreter : Verifies, OutputStateLookup { /** * Creates and adds a transaction to the ledger. - * @param transactionLabel: Optional label of the transaction, to be used in diagnostic messages. - * @param transactionBuilder: The base transactionBuilder that will be used to build the transaction. - * @param dsl: The dsl that should be interpreted for building the transaction. - * @return: The final [WireTransaction] of the built transaction. + * @param transactionLabel Optional label of the transaction, to be used in diagnostic messages. + * @param transactionBuilder The base transactionBuilder that will be used to build the transaction. + * @param dsl The dsl that should be interpreted for building the transaction. + * @return The final [WireTransaction] of the built transaction. */ fun _transaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TransactionDSL.() -> EnforceVerifyOrFail): WireTransaction /** * Creates and adds a transaction to the ledger that will not be verified by [verifies]. - * @param transactionLabel: Optional label of the transaction, to be used in diagnostic messages. - * @param transactionBuilder: The base transactionBuilder that will be used to build the transaction. - * @param dsl: The dsl that should be interpreted for building the transaction. - * @return: The final [WireTransaction] of the built transaction. + * @param transactionLabel Optional label of the transaction, to be used in diagnostic messages. + * @param transactionBuilder The base transactionBuilder that will be used to build the transaction. + * @param dsl The dsl that should be interpreted for building the transaction. + * @return The final [WireTransaction] of the built transaction. */ fun _unverifiedTransaction(transactionLabel: String?, transactionBuilder: TransactionBuilder, dsl: TransactionDSL.() -> Unit): WireTransaction /** * Creates a local scoped copy of the ledger. - * @param dsl: The ledger DSL to be interpreted using the copy. + * @param dsl The ledger DSL to be interpreted using the copy. */ fun tweak(dsl: LedgerDSL>.() -> Unit) /** * Adds an attachment to the ledger. - * @param attachment: The [InputStream] defining the contents of the attachment. - * @return: The [SecureHash] that identifies the attachment, to be used in transactions. + * @param attachment The [InputStream] defining the contents of the attachment. + * @return The [SecureHash] that identifies the attachment, to be used in transactions. */ fun attachment(attachment: InputStream): SecureHash diff --git a/core/src/main/kotlin/com/r3corda/core/testing/TestDSL.kt b/core/src/main/kotlin/com/r3corda/core/testing/TestDSL.kt index d950506da2..e3e85158b8 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/TestDSL.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/TestDSL.kt @@ -345,9 +345,9 @@ data class TestLedgerDSLInterpreter private constructor ( /** * Signs all transactions passed in. - * @param transactionsToSign: Transactions to be signed. - * @param extraKeys: extra keys to sign transactions with. - * @return: List of [SignedTransaction]s. + * @param transactionsToSign Transactions to be signed. + * @param extraKeys extra keys to sign transactions with. + * @return List of [SignedTransaction]s. */ fun signAll(transactionsToSign: List, extraKeys: Array) = transactionsToSign.map { wtx -> val allPubKeys = wtx.signers.toMutableSet() @@ -365,8 +365,8 @@ fun signAll(transactionsToSign: List, extraKeys: Array.signAll( vararg extraKeys: KeyPair) = signAll(this.interpreter.wireTransactions, extraKeys) 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 88e3de34f7..22ac3aa343 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/TestUtils.kt @@ -90,9 +90,9 @@ object JavaTestHelpers { /** * Creates and tests a ledger built by the passed in dsl. - * @param identityService: The [IdentityService] to be used while building the ledger. - * @param storageService: The [StorageService] to be used for storing e.g. [Attachment]s. - * @param dsl: The dsl building the ledger. + * @param identityService The [IdentityService] to be used while building the ledger. + * @param storageService The [StorageService] to be used for storing e.g. [Attachment]s. + * @param dsl The dsl building the ledger. */ @JvmStatic @JvmOverloads fun ledger( identityService: IdentityService = MOCK_IDENTITY_SERVICE, diff --git a/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt b/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt index 0edb41f944..f640604f1d 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt @@ -10,7 +10,7 @@ import java.time.Instant /** * This interface defines the bare bone functionality that a Transaction DSL interpreter should implement. - * @param : The return type of [verifies]/[failsWith] and the like. It is generic so that we have control over whether + * @param The return type of [verifies]/[failsWith] and the like. It is generic so that we have control over whether * we want to enforce users to call these methods (@see [EnforceVerifyOrFail]) or not. */ interface TransactionDSLInterpreter : Verifies, OutputStateLookup { @@ -21,34 +21,34 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup { /** * Adds an input reference to the transaction. Note that [verifies] will resolve this reference. - * @param stateRef: The input [StateRef]. + * @param stateRef The input [StateRef]. */ fun input(stateRef: StateRef) /** * Adds an output to the transaction. - * @param label: An optional label that may be later used to retrieve the output probably in other transactions. - * @param notary: The associated notary. - * @param contractState: The state itself. + * @param label An optional label that may be later used to retrieve the output probably in other transactions. + * @param notary The associated notary. + * @param contractState The state itself. */ fun _output(label: String?, notary: Party, contractState: ContractState) /** * Adds an [Attachment] reference to the transaction. - * @param attachmentId: The hash of the attachment, possibly returned by [LedgerDSLInterpreter.attachment] + * @param attachmentId The hash of the attachment, possibly returned by [LedgerDSLInterpreter.attachment] */ fun attachment(attachmentId: SecureHash) /** * Adds a command to the transaction. - * @param signers: The signer public keys. - * @param commandData: The contents of the command. + * @param signers The signer public keys. + * @param commandData The contents of the command. */ fun _command(signers: List, commandData: CommandData) /** * Creates a local scoped copy of the transaction. - * @param dsl: The transaction DSL to be interpreted using the copy. + * @param dsl The transaction DSL to be interpreted using the copy. */ fun tweak(dsl: TransactionDSL.() -> EnforceVerifyOrFail): EnforceVerifyOrFail } @@ -58,14 +58,14 @@ class TransactionDSL (val interpreter: T) : /** * Looks up the output label and adds the found state as an input. - * @param stateLabel: The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends. + * @param stateLabel The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends. */ fun input(stateLabel: String) = input(retrieveOutputStateAndRef(ContractState::class.java, stateLabel).ref) /** * Creates an [LedgerDSLInterpreter._unverifiedTransaction] with a single output state and adds it's reference as an * input to the current transaction. - * @param state: The state to be added. + * @param state The state to be added. */ fun input(state: ContractState) { val transaction = ledgerInterpreter._unverifiedTransaction(null, TransactionBuilder()) { @@ -102,17 +102,17 @@ class TransactionDSL (val interpreter: T) : /** * Adds a timestamp command to the transaction. - * @param time: The [Instant] of the [TimestampCommand]. - * @param tolerance: The tolerance of the [TimestampCommand]. - * @param notary: The notary to sign the command. + * @param time The [Instant] of the [TimestampCommand]. + * @param tolerance The tolerance of the [TimestampCommand]. + * @param notary The notary to sign the command. */ @JvmOverloads fun timestamp(time: Instant, tolerance: Duration = 30.seconds, notary: PublicKey = DUMMY_NOTARY.owningKey) = timestamp(TimestampCommand(time, tolerance), notary) /** * Adds a timestamp command to the transaction. - * @param data: The [TimestampCommand]. - * @param notary: The notary to sign the command. + * @param data The [TimestampCommand]. + * @param notary The notary to sign the command. */ @JvmOverloads fun timestamp(data: TimestampCommand, notary: PublicKey = DUMMY_NOTARY.owningKey) = command(notary, data)