Clean up identities in tests, stage 1 (#2059)

* Clean up identities in CashTests so that the mini/mega corp keys and identities are correctly
paired together throughout. Previously `miniCorpServices` presented the same key as the
MegaCorp identity, but with the name Mini Corp attached.
* Correct key/name matches in VaultWithCashTest
* Split services in CashTests to not have multiple identities per service hub
This commit is contained in:
Ross Nicoll
2017-11-16 17:17:45 +00:00
committed by GitHub
parent 37b34c6fc1
commit e4f5e16bf4
15 changed files with 117 additions and 92 deletions

View File

@ -31,6 +31,7 @@ import java.util.*
@JvmOverloads
fun ServiceHub.fillWithSomeTestDeals(dealIds: List<String>,
issuerServices: ServiceHub = this,
participants: List<AbstractParty> = emptyList(),
notary: Party = DUMMY_NOTARY): Vault<DealState> {
val myKey: PublicKey = myInfo.chooseIdentity().owningKey
@ -42,7 +43,7 @@ fun ServiceHub.fillWithSomeTestDeals(dealIds: List<String>,
addOutputState(DummyDealContract.State(ref = it, participants = participants.plus(me)), DUMMY_DEAL_PROGRAM_ID)
addCommand(dummyCommand())
}
val stx = signInitialTransaction(dummyIssue)
val stx = issuerServices.signInitialTransaction(dummyIssue)
return@map addSignature(stx, notary.owningKey)
}