mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
* Don't expose StartedNode via Node Driver * Dont expose StartedNode/Abstract Node via MockNetwork * Remove internal var from constructor as it doesn't hide from public api and change to internal initialisation method * Update api * Rename MockNode to StartedMockNode to avoid confusion Update documentation Update api-current.txt * Fix typo * Fix test failure * Modify flow tests to use internal mock network and remove additional internal exposures from StartedMockNode * Fix api-current * Change InProcess and OutOfProcess to interfaces * Explicitly declare MockNetwork parameters Dont expose StateMachineManager Move affected tests to use internal mock network * Fix api-current * Changes requested via review * Fix IRS Demo address * Fix api * Remove internal attribute from classes in internal package * Remove accidentally added code * Move useHttps into NodeHandleInternal * Remove duplicated code * Update api-current * Make webAddress internal on NodeHandle * Make sure parameters in public api are explicitly specified * Use correct address in IRS Demo * Get webaddress from webserver handle * Update api-current # Conflicts: # .ci/api-current.txt
This commit is contained in:
committed by
Katelyn Baker
parent
805178debc
commit
e363090f30
@ -12,7 +12,7 @@ import net.corda.testing.core.BOC_NAME
|
||||
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
||||
import net.corda.testing.core.DUMMY_BANK_B_NAME
|
||||
import net.corda.testing.core.chooseIdentity
|
||||
import net.corda.testing.driver.NodeHandle
|
||||
import net.corda.testing.driver.InProcess
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.User
|
||||
import net.corda.testing.node.internal.poll
|
||||
@ -37,14 +37,14 @@ class TraderDemoTest {
|
||||
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = listOf(demoUser)),
|
||||
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = listOf(demoUser)),
|
||||
startNode(providedName = BOC_NAME, rpcUsers = listOf(bankUser))
|
||||
).map { (it.getOrThrow() as NodeHandle.InProcess).node }
|
||||
).map { (it.getOrThrow() as InProcess) }
|
||||
nodeA.registerInitiatedFlow(BuyerFlow::class.java)
|
||||
val (nodeARpc, nodeBRpc) = listOf(nodeA, nodeB).map {
|
||||
val client = CordaRPCClient(it.internals.configuration.rpcOptions.address!!)
|
||||
val client = CordaRPCClient(it.rpcAddress)
|
||||
client.start(demoUser.username, demoUser.password).proxy
|
||||
}
|
||||
val nodeBankRpc = let {
|
||||
val client = CordaRPCClient(bankNode.internals.configuration.rpcOptions.address!!)
|
||||
val client = CordaRPCClient(bankNode.rpcAddress)
|
||||
client.start(bankUser.username, bankUser.password).proxy
|
||||
}
|
||||
|
||||
@ -56,8 +56,8 @@ class TraderDemoTest {
|
||||
val expectedBCash = clientB.cashCount + 1
|
||||
val expectedPaper = listOf(clientA.commercialPaperCount + 1, clientB.commercialPaperCount)
|
||||
|
||||
clientBank.runIssuer(amount = 100.DOLLARS, buyerName = nodeA.info.chooseIdentity().name, sellerName = nodeB.info.chooseIdentity().name)
|
||||
clientB.runSeller(buyerName = nodeA.info.chooseIdentity().name, amount = 5.DOLLARS)
|
||||
clientBank.runIssuer(amount = 100.DOLLARS, buyerName = nodeA.services.myInfo.chooseIdentity().name, sellerName = nodeB.services.myInfo.chooseIdentity().name)
|
||||
clientB.runSeller(buyerName = nodeA.services.myInfo.chooseIdentity().name, amount = 5.DOLLARS)
|
||||
|
||||
assertThat(clientA.cashCount).isGreaterThan(originalACash)
|
||||
assertThat(clientB.cashCount).isEqualTo(expectedBCash)
|
||||
|
Reference in New Issue
Block a user