Class TestTransactionDSLInterpreter

  • All Implemented Interfaces:
    net.corda.testing.dsl.OutputStateLookup , net.corda.testing.dsl.TransactionDSLInterpreter , net.corda.testing.dsl.Verifies

    
    public final class TestTransactionDSLInterpreter
     implements TransactionDSLInterpreter, OutputStateLookup
                        

    This interpreter builds a transaction, and TransactionDSL.verifies that the resolved transaction is correct. Note that transactions corresponding to input states are not verified. Use LedgerDSL.verifies for that.

    • Constructor Detail

      • TestTransactionDSLInterpreter

        TestTransactionDSLInterpreter(TestLedgerDSLInterpreter ledgerInterpreter, <Error class: unknown class> transactionBuilder)
    • Method Detail

      • getServices

         final <Error class: unknown class> getServices()
      • input

         Unit )>input(<Error class: unknown class> stateRef)

        Adds an input reference to the transaction. Note that verifies will resolve this reference.

        Parameters:
        stateRef - The input StateRef.
      • reference

         Unit )>reference(<Error class: unknown class> stateRef)

        Add a reference input state to the transaction. Note that verifies will resolve this reference.

        Parameters:
        stateRef - The input StateRef.
      • output

         Unit ,java.lang.String,.,java.lang.Integer,.,.)>output(<Error class: unknown class> contractClassName, String label, <Error class: unknown class> notary, Integer encumbrance, <Error class: unknown class> attachmentConstraint, <Error class: unknown class> contractState)

        Adds an output to the transaction.

        Parameters:
        contractClassName - The class name of the contract that verifies this state.
        label - An optional label that may be later used to retrieve the output probably in other transactions.
        notary - The associated notary.
        encumbrance - The position of the encumbrance state.
        attachmentConstraint - The attachment constraint
        contractState - The state itself.
      • command

         Unit )>command(List<PublicKey> signers, <Error class: unknown class> commandData)

        Adds a command to the transaction.

        Parameters:
        signers - The signer public keys.
        commandData - The contents of the command.
      • timeWindow

         Unit )>timeWindow(<Error class: unknown class> data)

        Sets the time-window of the transaction.

        Parameters:
        data - the TimeWindow (validation window).
      • _attachment

         Unit )>_attachment(<Error class: unknown class> contractClassName)

        Attaches an attachment containing the named contract to the transaction

        Parameters:
        contractClassName - The contract class to attach
      • _attachment

         Unit ,.,java.util.List)>_attachment(<Error class: unknown class> contractClassName, <Error class: unknown class> attachmentId, List<PublicKey> signers)

        Attaches an attachment containing the named contract to the transaction

        Parameters:
        contractClassName - The contract class to attach
        attachmentId - The attachment
      • _attachment

         Unit ,.,java.util.List,java.util.Map)>_attachment(<Error class: unknown class> contractClassName, <Error class: unknown class> attachmentId, List<PublicKey> signers, Map<String, String> jarManifestAttributes)

        Attaches an attachment containing the named contract to the transaction.

        Parameters:
        contractClassName - The contract class to attach.
        attachmentId - The attachment.
        signers - The signers.
        jarManifestAttributes - The JAR manifest file attributes.