makeTestDatabaseAndPersistentServices

fun makeTestDatabaseAndPersistentServices(cordappPackages: List<String>, initialIdentity: <Error class: unknown class>, networkParameters: NetworkParameters = testNetworkParameters(modifiedTime = Instant.MIN), moreKeys: Set<KeyPair>, moreIdentities: Set<PartyAndCertificate>, cacheFactory: TestingNamedCacheFactory = TestingNamedCacheFactory()): <Error class: unknown class><<Error class: unknown class>, MockServices>

Makes database and persistent services appropriate for unit tests which require persistence across the vault, identity service and key managment service.

Return

A pair where the first element is the instance of CordaPersistence and the second is MockServices.

Parameters

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 MockServices.

moreIdentities

A list of additional KeyPair instances to be used by MockServices.

cacheFactory

A custom cache factory to be used by the created IdentityService