public static class MockServices.Companion
@JvmStatic @NotNull public java.util.Properties makeTestDataSourceProperties(@NotNull java.lang.String nodeName)
Make properties appropriate for creating a DataSource for unit tests.
nodeName
- Reflects the "instance" of the in-memory database. Defaults to a random string.@JvmStatic @JvmOverloads @NotNull public kotlin.Pair<net.corda.nodeapi.internal.persistence.CordaPersistence,net.corda.testing.node.MockServices> makeTestDatabaseAndMockServices(@NotNull java.util.List<java.lang.String> cordappPackages, @NotNull IdentityService identityService, @NotNull NonExistentClass initialIdentity, @NotNull NetworkParameters networkParameters, @NotNull java.security.KeyPair... moreKeys)
Makes database and mock services appropriate for unit tests.
cordappPackages
- A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.identityService
- An instance of interface IdentityService
, see makeTestIdentityService
.initialIdentity
- The first (typically sole) identity the services will represent.moreKeys
- A list of additional KeyPair instances to be used by class MockServices
.class MockServices
.@JvmStatic @JvmOverloads @NotNull public kotlin.Pair<net.corda.nodeapi.internal.persistence.CordaPersistence,net.corda.testing.node.MockServices> makeTestDatabaseAndMockServices(@NotNull java.util.List<java.lang.String> cordappPackages, @NotNull IdentityService identityService, @NotNull NonExistentClass initialIdentity, @NotNull java.security.KeyPair... moreKeys)
Makes database and mock services appropriate for unit tests.
cordappPackages
- A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.identityService
- An instance of interface IdentityService
, see makeTestIdentityService
.initialIdentity
- The first (typically sole) identity the services will represent.moreKeys
- A list of additional KeyPair instances to be used by class MockServices
.class MockServices
.@JvmStatic @JvmOverloads @NotNull public kotlin.Pair<net.corda.nodeapi.internal.persistence.CordaPersistence,net.corda.testing.node.MockServices> makeTestDatabaseAndPersistentServices(@NotNull java.util.List<java.lang.String> cordappPackages, @NotNull NonExistentClass initialIdentity, @NotNull NetworkParameters networkParameters, @NotNull java.util.Set<java.security.KeyPair> moreKeys, @NotNull java.util.Set<net.corda.core.identity.PartyAndCertificate> moreIdentities, @NotNull net.corda.testing.internal.TestingNamedCacheFactory cacheFactory)
Makes database and persistent services appropriate for unit tests which require persistence across the vault, identity service and key managment service.
cordappPackages
- A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.initialIdentity
- The first (typically sole) identity the services will represent.moreKeys
- A list of additional KeyPair instances to be used by class MockServices
.moreIdentities
- A list of additional KeyPair instances to be used by class MockServices
.cacheFactory
- A custom cache factory to be used by the created interface IdentityService
class MockServices
.@JvmStatic @JvmOverloads @NotNull public kotlin.Pair<net.corda.nodeapi.internal.persistence.CordaPersistence,net.corda.testing.node.MockServices> makeTestDatabaseAndPersistentServices(@NotNull java.util.List<java.lang.String> cordappPackages, @NotNull NonExistentClass initialIdentity, @NotNull NetworkParameters networkParameters, @NotNull java.util.Set<java.security.KeyPair> moreKeys, @NotNull java.util.Set<net.corda.core.identity.PartyAndCertificate> moreIdentities)
Makes database and persistent services appropriate for unit tests which require persistence across the vault, identity service and key managment service.
cordappPackages
- A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.initialIdentity
- The first (typically sole) identity the services will represent.moreKeys
- A list of additional KeyPair instances to be used by class MockServices
.moreIdentities
- A list of additional KeyPair instances to be used by class MockServices
.class MockServices
.@JvmStatic @JvmOverloads @NotNull public kotlin.Pair<net.corda.nodeapi.internal.persistence.CordaPersistence,net.corda.testing.node.MockServices> makeTestDatabaseAndPersistentServices(@NotNull java.util.List<java.lang.String> cordappPackages, @NotNull NonExistentClass initialIdentity, @NotNull java.util.Set<java.security.KeyPair> moreKeys, @NotNull java.util.Set<net.corda.core.identity.PartyAndCertificate> moreIdentities)
Makes database and persistent services appropriate for unit tests which require persistence across the vault, identity service and key managment service.
cordappPackages
- A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.initialIdentity
- The first (typically sole) identity the services will represent.moreKeys
- A list of additional KeyPair instances to be used by class MockServices
.moreIdentities
- A list of additional KeyPair instances to be used by class MockServices
.class MockServices
.