txs = api.account().txsToken("0xE376F69ED2218076682e2b3B7b9099eC50aD68c4");
assertNotNull(txs);
- assertEquals(106, txs.size());
+ assertEquals(3, txs.size());
assertTxs(txs);
assertNotEquals(0, txs.get(0).getGasPrice());
assertNotEquals(-1, txs.get(0).getNonce());
+
assertNotNull(txs.get(0).toString());
+ assertNotEquals(txs.get(0).toString(), txs.get(1).toString());
+
assertNotEquals(txs.get(0), txs.get(1));
assertNotEquals(txs.get(0).hashCode(), txs.get(1).hashCode());
+
+ assertEquals(txs.get(1), txs.get(1));
+ assertEquals(txs.get(1).hashCode(), txs.get(1).hashCode());
}
@Test
diff --git a/src/test/java/io/api/etherscan/account/AccountTxsTest.java b/src/test/java/io/api/etherscan/account/AccountTxsTest.java
index 7e9e05b..5c0ad48 100644
--- a/src/test/java/io/api/etherscan/account/AccountTxsTest.java
+++ b/src/test/java/io/api/etherscan/account/AccountTxsTest.java
@@ -38,6 +38,7 @@ public void correct() {
assertNotNull(txs.get(0).toString());
assertNotEquals(txs.get(0), txs.get(1));
assertNotEquals(txs.get(0).hashCode(), txs.get(1).hashCode());
+ assertEquals(txs.get(1), txs.get(1));
}
@Test
diff --git a/src/test/java/io/api/etherscan/block/BlockApiTest.java b/src/test/java/io/api/etherscan/block/BlockApiTest.java
index 2500d3b..c459b1a 100644
--- a/src/test/java/io/api/etherscan/block/BlockApiTest.java
+++ b/src/test/java/io/api/etherscan/block/BlockApiTest.java
@@ -28,12 +28,24 @@ public void correct() {
assertFalse(uncle.get().getUncles().isEmpty());
assertNotNull(uncle.get().getUncles().get(0).getBlockreward());
assertNotNull(uncle.get().getUncles().get(0).getMiner());
+ assertNotEquals(-1, uncle.get().getUncles().get(0).getUnclePosition());
assertNotNull(uncle.get().toString());
UncleBlock empty = new UncleBlock();
assertNotEquals(uncle.get().hashCode(), empty.hashCode());
assertNotEquals(uncle.get(), empty);
assertTrue(empty.isEmpty());
+
+ if(uncle.get().getUncles().size() > 0) {
+ assertNotEquals(-1, uncle.get().getUncles().get(0).getUnclePosition());
+ assertEquals(uncle.get().getUncles().get(0), uncle.get().getUncles().get(0));
+ assertEquals(uncle.get().getUncles().get(0).hashCode(), uncle.get().getUncles().get(0).hashCode());
+ }
+
+ if(uncle.get().getUncles().size() > 1) {
+ assertNotEquals(uncle.get().getUncles().get(1), uncle.get().getUncles().get(0));
+ assertNotEquals(uncle.get().getUncles().get(1).hashCode(), uncle.get().getUncles().get(0).hashCode());
+ }
}
@Test
diff --git a/src/test/java/io/api/etherscan/logs/LogsApiTest.java b/src/test/java/io/api/etherscan/logs/LogsApiTest.java
index d562321..4a3f9e1 100644
--- a/src/test/java/io/api/etherscan/logs/LogsApiTest.java
+++ b/src/test/java/io/api/etherscan/logs/LogsApiTest.java
@@ -86,6 +86,9 @@ public void validateQuery() {
assertNotNull(logs.get(0).getLogIndex());
assertNotNull(logs.get(0).getGasPrice());
assertNotNull(logs.get(0).toString());
+
+ assertEquals(logs.get(0), logs.get(0));
+ assertEquals(logs.get(0).hashCode(), logs.get(0).hashCode());
}
}
}
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy