NodeTestUtils
Keywords: net.corda.testing.node.NodeTestUtils class
Date: 2023-09-18

net.corda.testing.node

## Class NodeTestUtils

- net.corda.testing.node.NodeTestUtils

-     public class NodeTestUtils

- - ### Constructor Detail

    - #### NodeTestUtils

          public NodeTestUtils()

  - ### Method Detail

    - #### ledger

          @JvmOverloads
           @NotNull
          public static LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter> ledger(@NotNull
                                                                                                                                                                     ServiceHub $this$ledger,
                                                                                                                                                                     @NotNull
                                                                                                                                                                     Party notary,
                                                                                                                                                                     @NotNull
                                                                                                                                                                     kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter>,kotlin.Unit> script)

      Creates and tests a ledger built by the passed in dsl.

    - #### ledger

          @JvmOverloads
           @NotNull
          public static LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter> ledger(@NotNull
                                                                                                                                                                     ServiceHub $this$ledger,
                                                                                                                                                                     @NotNull
                                                                                                                                                                     kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter>,kotlin.Unit> script)

      Creates and tests a ledger built by the passed in dsl.

    - #### transaction

          @JvmOverloads
           @NotNull
          public static LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter> transaction(@NotNull
                                                                                                                                                                          ServiceHub $this$transaction,
                                                                                                                                                                          @NotNull
                                                                                                                                                                          Party notary,
                                                                                                                                                                          @NotNull
                                                                                                                                                                          kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.TransactionDSL<? extends net.corda.testing.dsl.TransactionDSLInterpreter>,? extends net.corda.testing.dsl.EnforceVerifyOrFail> script)

      Creates a ledger with a single transaction, built by the passed in dsl.

      See Also:
        `LedgerDSLInterpreter._transaction`

    - #### transaction

          @JvmOverloads
           @NotNull
          public static LedgerDSL<net.corda.testing.dsl.TestTransactionDSLInterpreter,net.corda.testing.dsl.TestLedgerDSLInterpreter> transaction(@NotNull
                                                                                                                                                                          ServiceHub $this$transaction,
                                                                                                                                                                          @NotNull
                                                                                                                                                                          kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.TransactionDSL<? extends net.corda.testing.dsl.TransactionDSLInterpreter>,? extends net.corda.testing.dsl.EnforceVerifyOrFail> script)

      Creates a ledger with a single transaction, built by the passed in dsl.

      See Also:
        `LedgerDSLInterpreter._transaction`

    - #### testActor

          @NotNull
          public static Actor testActor(@NotNull
                                                 CordaX500Name owningLegalIdentity)

      Creates a new `class Actor` for use in testing with the given `owningLegalIdentity`.

      See Also:
        `class Actor`, `owningLegalIdentity`

    - #### testContext

          @NotNull
          public static InvocationContext testContext(@NotNull
                                                               CordaX500Name owningLegalIdentity)

      Creates a new `class InvocationContext` for use in testing with the given `owningLegalIdentity`.

      See Also:
        `class InvocationContext`, `owningLegalIdentity`