You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/08/21 06:48:06 UTC

[camel] branch master updated: Fixed test in camel-web3j as the hash operation is using numbers as input.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new a533dcc  Fixed test in camel-web3j as the hash operation is using numbers as input.
a533dcc is described below

commit a533dccbbcdf825df05d6b560e6f64870832c751
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 21 08:47:56 2018 +0200

    Fixed test in camel-web3j as the hash operation is using numbers as input.
---
 .../camel/component/web3j/Web3jQuorumProducerTest.java     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/components/camel-web3j/src/test/java/org/apache/camel/component/web3j/Web3jQuorumProducerTest.java b/components/camel-web3j/src/test/java/org/apache/camel/component/web3j/Web3jQuorumProducerTest.java
index aa68394..0362ed7 100644
--- a/components/camel-web3j/src/test/java/org/apache/camel/component/web3j/Web3jQuorumProducerTest.java
+++ b/components/camel-web3j/src/test/java/org/apache/camel/component/web3j/Web3jQuorumProducerTest.java
@@ -87,12 +87,12 @@ public class Web3jQuorumProducerTest extends Web3jMockTestSupport {
         CanonicalHash response = Mockito.mock(CanonicalHash.class);
         Mockito.when(mockQuorum.quorumCanonicalHash(any())).thenReturn(request);
         Mockito.when(request.send()).thenReturn(response);
-        Mockito.when(response.getCanonicalHash()).thenReturn("test");
+        Mockito.when(response.getCanonicalHash()).thenReturn("4444");
 
-        Exchange exchange = createExchangeWithBodyAndHeader("test-hash", OPERATION, Web3jConstants.QUORUM_CANONICAL_HASH);
+        Exchange exchange = createExchangeWithBodyAndHeader("1234567890", OPERATION, Web3jConstants.QUORUM_CANONICAL_HASH);
         template.send(exchange);
         String body = exchange.getIn().getBody(String.class);
-        assertTrue(body.equals("test"));
+        assertEquals("4444", body);
     }
 
     @Test
@@ -105,7 +105,7 @@ public class Web3jQuorumProducerTest extends Web3jMockTestSupport {
         Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.QUORUM_VOTE);
         template.send(exchange);
         String body = exchange.getIn().getBody(String.class);
-        assertTrue(body.equals("test"));
+        assertEquals("test", body);
     }
 
     @Test
@@ -118,7 +118,7 @@ public class Web3jQuorumProducerTest extends Web3jMockTestSupport {
         Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.QUORUM_MAKE_BLOCK);
         template.send(exchange);
         String body = exchange.getIn().getBody(String.class);
-        assertTrue(body.equals("test"));
+        assertEquals("test", body);
     }
 
     @Test
@@ -183,7 +183,7 @@ public class Web3jQuorumProducerTest extends Web3jMockTestSupport {
         Exchange exchange = createExchangeWithBodyAndHeader("foo", OPERATION, Web3jConstants.QUORUM_GET_PRIVATE_PAYLOAD);
         template.send(exchange);
         String body = exchange.getIn().getBody(String.class);
-        assertTrue(body.equals("secret"));
+        assertEquals("secret", body);
     }
 
     @Test
@@ -196,7 +196,7 @@ public class Web3jQuorumProducerTest extends Web3jMockTestSupport {
         Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.QUORUM_ETH_SEND_TRANSACTION);
         template.send(exchange);
         String body = exchange.getIn().getBody(String.class);
-        assertTrue(body.equals("test"));
+        assertEquals("test", body);
     }
 
     @Override