From 3d2079ea70f2b0e0a1c18e24153e714cc2485817 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Wed, 7 Jun 2017 11:12:47 +0100 Subject: [PATCH] Started adding a new part of the IRS test. --- .../integration-test/kotlin/net/corda/irs/IRSDemoTest.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt b/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt index 337311b1dc..91e1addbd6 100644 --- a/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt +++ b/samples/irs-demo/src/integration-test/kotlin/net/corda/irs/IRSDemoTest.kt @@ -61,6 +61,8 @@ class IRSDemoTest : IntegrationTestCategory { runDateChange(nodeBAddr) nextFixingDates.first { it == null || it > futureDate } + + assertThat(getTrades(nodeAAddr)[0] as InterestRateSwap.State) } } @@ -104,4 +106,10 @@ class IRSDemoTest : IntegrationTestCategory { val deals = api.getJson>("deals") return deals.size } + + private fun getTrades(nodeAddr: HostAndPort): Array<*> { + val api = HttpApi.fromHostAndPort(nodeAddr, "api/irs") + val deals = api.getJson>("deals") + return deals + } }