use of org.jbpm.process.workitem.ethereum.DeployContractWorkitemHandler in project jbpm-work-items by kiegroup.
the class EthereumWorkitemHandlerTest method testDeployContract.
@Test
public void testDeployContract() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
WorkItemImpl workItem = new WorkItemImpl();
workItem.setParameter("ServiceURL", "http://localhost:8545/");
workItem.setParameter("ContractPath", "contract/Storage.bin");
workItem.setParameter("DepositAmount", "10");
workItem.setParameter("WaitForReceipt", "false");
DeployContractWorkitemHandler handler = new DeployContractWorkitemHandler(TEST_WALLET_PASSWORD, "wallet/testwallet.json");
handler.setWeb3j(web3j);
handler.executeWorkItem(workItem, manager);
assertNotNull(manager.getResults());
assertEquals(1, manager.getResults().size());
assertTrue(manager.getResults().containsKey(workItem.getId()));
}
Aggregations