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

net.corda.testing.node

## Class MockServicesKt

- net.corda.testing.node.MockServicesKt

-     public class MockServicesKt

- - ### Constructor Detail

    - #### MockServicesKt

          public MockServicesKt()

  - ### Method Detail

    - #### makeTestIdentityService

          @NotNull
          public static IdentityService makeTestIdentityService(@NotNull
                                                                         net.corda.core.identity.PartyAndCertificate... identities)

      Returns a simple `interface IdentityService` containing the supplied `identities`.

      See Also:
        `interface IdentityService`, `identities`

    - #### createMockCordaService

          @NotNull
          public static <T extends SerializeAsToken> T createMockCordaService(@NotNull
                                                                                       MockServices serviceHub,
                                                                                       @NotNull
                                                                                       kotlin.jvm.functions.Function1<? super net.corda.core.node.AppServiceHub,? extends T> serviceConstructor)

      Function which can be used to create a mock `annotationclass CordaService` for use within testing, such as an Oracle.

      See Also:
        `annotationclass CordaService`