use of org.ethereum.rpc.Web3Impl in project rskj by rsksmart.
the class Web3ImplRpcTest method getRpcModules.
@Test
public void getRpcModules() {
Ethereum eth = Web3Mocks.getMockEthereum();
Blockchain blockchain = Web3Mocks.getMockBlockchain();
TransactionPool transactionPool = Web3Mocks.getMockTransactionPool();
PersonalModule pm = new PersonalModuleWalletDisabled();
Repository repository = Web3Mocks.getMockRepository();
Web3Impl web3 = new Web3RskImpl(eth, blockchain, transactionPool, new RskSystemProperties(), null, null, pm, null, null, null, repository, null, null, null, null, null, null, null, null);
Map<String, String> result = web3.rpc_modules();
Assert.assertNotNull(result);
Assert.assertFalse(result.isEmpty());
Assert.assertTrue(result.containsKey("eth"));
Assert.assertEquals("1.0", result.get("eth"));
}
Aggregations