corda / net.corda.testing.node / MockServices / <init>

<init>

MockServices(cordappPackages: Iterable<String>, initialIdentity: <ERROR CLASS>, identityService: IdentityService = makeTestIdentityService(), vararg moreKeys: KeyPair)
MockServices(cordappPackages: Iterable<String>, initialIdentityName: CordaX500Name, identityService: IdentityService = makeTestIdentityService(), key: KeyPair, vararg moreKeys: KeyPair)

Create a mock ServiceHub that looks for app code in the given package names, uses the provided identity service (you can get one from makeTestIdentityService) and represents the given identity.

MockServices(cordappPackages: Iterable<String>, initialIdentity: <ERROR CLASS>, identityService: IdentityService, networkParameters: NetworkParameters, vararg moreKeys: KeyPair)
MockServices(cordappPackages: Iterable<String>, initialIdentity: <ERROR CLASS>, identityService: IdentityService, networkParameters: NetworkParameters, vararg moreKeys: KeyPair, keyManagementService: KeyManagementService)
MockServices(cordappPackages: List<String>, initialIdentityName: CordaX500Name, identityService: IdentityService, networkParameters: NetworkParameters)
MockServices(cordappPackages: List<String>, initialIdentityName: CordaX500Name, identityService: IdentityService, networkParameters: NetworkParameters, key: KeyPair)
MockServices(firstIdentity: <ERROR CLASS>, networkParameters: NetworkParameters, vararg moreIdentities: <ERROR CLASS>)
MockServices(cordappPackages: List<String>, firstIdentity: <ERROR CLASS>, vararg moreIdentities: <ERROR CLASS>)
MockServices(cordappPackages: List<String>, firstIdentity: <ERROR CLASS>, networkParameters: NetworkParameters, vararg moreIdentities: <ERROR CLASS>) MockServices(cordappPackages: Iterable<String>, initialIdentityName: CordaX500Name, identityService: IdentityService = makeTestIdentityService())

Create a mock ServiceHub that can't load CorDapp code, which uses the provided identity service (you can get one from makeTestIdentityService) and which represents the given identity.

MockServices(cordappPackages: Iterable<String>)

Create a mock ServiceHub that can't load CorDapp code, and which uses a default service identity.

MockServices(initialIdentityName: CordaX500Name, identityService: IdentityService = makeTestIdentityService(), key: KeyPair, vararg moreKeys: KeyPair)

Create a mock ServiceHub which uses the package of the caller to find CorDapp code. It uses the provided identity service (you can get one from makeTestIdentityService) and which represents the given identity.

MockServices(initialIdentityName: CordaX500Name, identityService: IdentityService = makeTestIdentityService())

Create a mock ServiceHub which uses the package of the caller to find CorDapp code. It uses the provided identity service (you can get one from makeTestIdentityService) and which represents the given identity. It has no keys.

MockServices(firstIdentity: <ERROR CLASS>, vararg moreIdentities: <ERROR CLASS>)

A helper constructor that requires at least one test identity to be registered, and which takes the package of the caller as the package in which to find app code. This is the most convenient constructor and the one that is normally worth using. The first identity is the identity of this service hub, the rest are identities that it is aware of.

MockServices()

Create a mock ServiceHub which uses the package of the caller to find CorDapp code. It uses a default service identity.