mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
CordaRPCJavaClientTest refactoring to align with enterprise repo. (#2299)
* Align CordaRPCJavaClientTest with Kotlin version of the test ((byte)0 instead of "1".getBytes()) * Refactoring to align with enterprise repo (exceptions).
This commit is contained in:
parent
5ce873a6e4
commit
cb0b311077
@ -55,7 +55,7 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws ExecutionException, InterruptedException {
|
public void setUp() throws Exception {
|
||||||
node = startNode(ALICE_NAME, 1, singletonList(rpcUser));
|
node = startNode(ALICE_NAME, 1, singletonList(rpcUser));
|
||||||
client = new CordaRPCClient(requireNonNull(node.getInternals().getConfiguration().getRpcAddress()));
|
client = new CordaRPCClient(requireNonNull(node.getInternals().getConfiguration().getRpcAddress()));
|
||||||
}
|
}
|
||||||
@ -71,11 +71,11 @@ public class CordaRPCJavaClientTest extends NodeBasedTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCashBalances() throws NoSuchFieldException, ExecutionException, InterruptedException {
|
public void testCashBalances() throws ExecutionException, InterruptedException {
|
||||||
login(rpcUser.getUsername(), rpcUser.getPassword());
|
login(rpcUser.getUsername(), rpcUser.getPassword());
|
||||||
|
|
||||||
FlowHandle<AbstractCashFlow.Result> flowHandle = rpcProxy.startFlowDynamic(CashIssueFlow.class,
|
FlowHandle<AbstractCashFlow.Result> flowHandle = rpcProxy.startFlowDynamic(CashIssueFlow.class,
|
||||||
DOLLARS(123), OpaqueBytes.of("1".getBytes()),
|
DOLLARS(123), OpaqueBytes.of((byte)0),
|
||||||
CoreTestUtils.chooseIdentity(node.getInfo()));
|
CoreTestUtils.chooseIdentity(node.getInfo()));
|
||||||
System.out.println("Started issuing cash, waiting on result");
|
System.out.println("Started issuing cash, waiting on result");
|
||||||
flowHandle.getReturnValue().get();
|
flowHandle.getReturnValue().get();
|
||||||
|
Loading…
Reference in New Issue
Block a user