@JvmStatic @JvmOverloads fun makeTestDatabaseAndPersistentServices(cordappPackages: List<String>, initialIdentity: <ERROR CLASS>, networkParameters: NetworkParameters = testNetworkParameters(modifiedTime = Instant.MIN), moreKeys: Set<KeyPair>, moreIdentities: Set<PartyAndCertificate>, cacheFactory: TestingNamedCacheFactory = TestingNamedCacheFactory()): Pair<CordaPersistence, MockServices>
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 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
Return
A pair where the first element is the instance of CordaPersistence and the second is MockServices.