corda / net.corda.testing.node / MockServices / makeTestDatabaseAndMockServices

makeTestDatabaseAndMockServices

@JvmStatic @JvmOverloads fun makeTestDatabaseAndMockServices(cordappPackages: List<String>, identityService: IdentityService, initialIdentity: <ERROR CLASS>, networkParameters: NetworkParameters = testNetworkParameters(modifiedTime = Instant.MIN), vararg moreKeys: KeyPair): Pair<CordaPersistence, MockServices>

Makes database and mock services appropriate for unit tests.

Parameters

cordappPackages - A List of cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services.

identityService - An instance of IdentityService, see makeTestIdentityService.

initialIdentity - The first (typically sole) identity the services will represent.

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

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