Started adding a new part of the IRS test.

This commit is contained in:
Clinton Alexander 2017-06-07 11:12:47 +01:00
parent 9b1cb931e9
commit 3d2079ea70

View File

@ -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<Array<*>>("deals")
return deals.size
}
private fun getTrades(nodeAddr: HostAndPort): Array<*> {
val api = HttpApi.fromHostAndPort(nodeAddr, "api/irs")
val deals = api.getJson<Array<*>>("deals")
return deals
}
}