core.testing / MockIdentityService

# MockIdentityService

`class MockIdentityService : IdentityService`

Scaffolding: a dummy identity service that just expects to have identities loaded off disk or found elsewhere. This class allows the provided list of identities to be mutated after construction, so it takes the list lock when doing lookups and recalculates the mapping each time. The ability to change the list is used by the MockNetwork code.

### Constructors

<init> | `MockIdentityService(identities: List<Party>)` Scaffolding: a dummy identity service that just expects to have identities loaded off disk or found elsewhere. This class allows the provided list of identities to be mutated after construction, so it takes the list lock when doing lookups and recalculates the mapping each time. The ability to change the list is used by the MockNetwork code.

### Properties

identities | `val identities: List<Party>`

### Functions

partyFromKey | `fun partyFromKey(key: PublicKey): Party?`
partyFromName | `fun partyFromName(name: String): Party?`
registerIdentity | `fun registerIdentity(party: Party): Unit`