Use startFlowAndRunNetwork

This commit is contained in:
Dominic Fox 2018-07-18 15:21:04 +01:00
parent 201628e44f
commit 0780d6051e

View File

@ -59,7 +59,7 @@ class ReceiveMultipleFlowTests : WithMockNet {
} }
assert.that( assert.that(
nodes[0].startFlow(initiatingFlow).andRunNetwork(), nodes[0].startFlowAndRunNetwork(initiatingFlow),
succeedsWith(isA(equalTo(answer)))) succeedsWith(isA(equalTo(answer))))
} }
@ -71,8 +71,7 @@ class ReceiveMultipleFlowTests : WithMockNet {
nodes[2].registerAnswer(AlgorithmDefinition::class, stringValue) nodes[2].registerAnswer(AlgorithmDefinition::class, stringValue)
assert.that( assert.that(
nodes[0].startFlow(ParallelAlgorithmMap(nodes[1].info.singleIdentity(), nodes[2].info.singleIdentity())) nodes[0].startFlowAndRunNetwork(ParallelAlgorithmMap(nodes[1].info.singleIdentity(), nodes[2].info.singleIdentity())),
.andRunNetwork(),
succeedsWith(equalTo(doubleValue * stringValue.length))) succeedsWith(equalTo(doubleValue * stringValue.length)))
} }
@ -84,8 +83,7 @@ class ReceiveMultipleFlowTests : WithMockNet {
nodes[2].registerAnswer(ParallelAlgorithmList::class, value2) nodes[2].registerAnswer(ParallelAlgorithmList::class, value2)
assert.that( assert.that(
nodes[0].startFlow(ParallelAlgorithmList(nodes[1].info.singleIdentity(), nodes[2].info.singleIdentity())) nodes[0].startFlowAndRunNetwork(ParallelAlgorithmList(nodes[1].info.singleIdentity(), nodes[2].info.singleIdentity())),
.andRunNetwork(),
succeedsWith(equalTo(listOf(value1, value2)))) succeedsWith(equalTo(listOf(value1, value2))))
} }