CORDA-654 MockServices no longer has hard-coded identities (#2192)

* Resurrect a test
* Fix a broken test
* Pass in the initial identity
* Make IdentityService easier to mock
This commit is contained in:
Andrzej Cichocki
2017-12-07 11:55:18 +00:00
committed by GitHub
parent eb3b816d90
commit c36bea3af5
28 changed files with 168 additions and 120 deletions

View File

@ -36,9 +36,8 @@ class TransactionGraphSearchTests {
* @param signer signer for the two transactions and their commands.
*/
fun buildTransactions(command: CommandData): GraphTransactionStorage {
val megaCorpServices = MockServices(listOf("net.corda.testing.contracts"), MEGA_CORP.name, MEGA_CORP_KEY)
val notaryServices = MockServices(listOf("net.corda.testing.contracts"), DUMMY_NOTARY.name, DUMMY_NOTARY_KEY)
val megaCorpServices = MockServices(listOf("net.corda.testing.contracts"), rigorousMock(), MEGA_CORP.name, MEGA_CORP_KEY)
val notaryServices = MockServices(listOf("net.corda.testing.contracts"), rigorousMock(), DUMMY_NOTARY.name, DUMMY_NOTARY_KEY)
val originBuilder = TransactionBuilder(DUMMY_NOTARY)
.addOutputState(DummyState(random31BitValue()), DummyContract.PROGRAM_ID)
.addCommand(command, MEGA_CORP_PUBKEY)