@Test public void testListEvents() throws Exception { final ContractTemplate contractTemplate = new ContractTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final List<Event> expected = emptyList(); when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); contractTemplate.requester = mockRequester; final EventFilter eventFilter = EventFilter.newBuilder(anyContractAddress).build(); final List<Event> actual = contractTemplate.listEvents(eventFilter); assertEquals(expected, actual); }
@Override public List<Event> listEvents(final EventFilter filter) { return request(contractMethods.getListEvent(), Arrays.<Object>asList(filter)); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public List<Event> listEvents(final EventFilter filter) { return request(contractMethods.getListEvent(), Arrays.<Object>asList(filter)); } }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public List<Event> listEvents(final EventFilter filter) { return request(contractMethods.getListEvent(), Arrays.<Object>asList(filter)); } ContractTemplate(final ContextStorage<Context> contextStorage); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public List<Event> listEvents(final EventFilter filter) { return request(contractMethods.getListEvent(), Arrays.<Object>asList(filter)); } ContractTemplate(final ContextStorage<Context> contextStorage); @Override ContractTxReceipt getReceipt(final ContractTxHash contractTxHash); @Override ContractTxReceipt getContractTxReceipt(final TxHash txHash); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash deploy(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override TxHash deployTx(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash redeploy(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override TxHash redeployTx(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override ContractInterface getContractInterface(final ContractAddress contractAddress); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractTxHash execute(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override TxHash executeTx(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractResult query(final ContractInvocation contractInvocation); @Override List<Event> listEvents(final EventFilter filter); @Override Subscription<Event> subscribeEvent(final EventFilter filter,
      final StreamObserver<Event> observer); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public List<Event> listEvents(final EventFilter filter) { return request(contractMethods.getListEvent(), Arrays.<Object>asList(filter)); } ContractTemplate(final ContextStorage<Context> contextStorage); @Override ContractTxReceipt getReceipt(final ContractTxHash contractTxHash); @Override ContractTxReceipt getContractTxReceipt(final TxHash txHash); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash deploy(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override TxHash deployTx(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash redeploy(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override TxHash redeployTx(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override ContractInterface getContractInterface(final ContractAddress contractAddress); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractTxHash execute(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override TxHash executeTx(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractResult query(final ContractInvocation contractInvocation); @Override List<Event> listEvents(final EventFilter filter); @Override Subscription<Event> subscribeEvent(final EventFilter filter,
      final StreamObserver<Event> observer);  }