Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03f2538

Browse files
committed
Coverage improvements
1 parent87776ca commit03f2538

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

‎src/main/java/io/api/etherscan/model/TxToken.java‎

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,6 @@ public long getConfirmations() {
5656
}
5757
//</editor-fold>
5858

59-
@Override
60-
publicbooleanequals(Objecto) {
61-
if (this ==o)returntrue;
62-
if (o ==null ||getClass() !=o.getClass())returnfalse;
63-
if (!super.equals(o))returnfalse;
64-
65-
TxTokentxToken = (TxToken)o;
66-
67-
if (nonce !=txToken.nonce)returnfalse;
68-
if (transactionIndex !=txToken.transactionIndex)returnfalse;
69-
if (gasPrice !=txToken.gasPrice)returnfalse;
70-
if (cumulativeGasUsed !=txToken.cumulativeGasUsed)returnfalse;
71-
if (confirmations !=txToken.confirmations)returnfalse;
72-
if (blockHash !=null ? !blockHash.equals(txToken.blockHash) :txToken.blockHash !=null)returnfalse;
73-
if (tokenName !=null ? !tokenName.equals(txToken.tokenName) :txToken.tokenName !=null)returnfalse;
74-
if (tokenSymbol !=null ? !tokenSymbol.equals(txToken.tokenSymbol) :txToken.tokenSymbol !=null)returnfalse;
75-
returntokenDecimal !=null ?tokenDecimal.equals(txToken.tokenDecimal) :txToken.tokenDecimal ==null;
76-
}
77-
78-
@Override
79-
publicinthashCode() {
80-
intresult =super.hashCode();
81-
result =31 *result + (int) (nonce ^ (nonce >>>32));
82-
result =31 *result + (blockHash !=null ?blockHash.hashCode() :0);
83-
result =31 *result + (tokenName !=null ?tokenName.hashCode() :0);
84-
result =31 *result + (tokenSymbol !=null ?tokenSymbol.hashCode() :0);
85-
result =31 *result + (tokenDecimal !=null ?tokenDecimal.hashCode() :0);
86-
result =31 *result +transactionIndex;
87-
result =31 *result + (int) (gasPrice ^ (gasPrice >>>32));
88-
result =31 *result + (int) (cumulativeGasUsed ^ (cumulativeGasUsed >>>32));
89-
result =31 *result + (int) (confirmations ^ (confirmations >>>32));
90-
returnresult;
91-
}
92-
9359
@Override
9460
publicStringtoString() {
9561
return"TxToken{" +

‎src/test/java/io/api/etherscan/account/AccountTxTokenTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public void correct() {
2828
assertNotEquals(-1,txs.get(0).getNonce());
2929
assertNotNull(txs.get(0).toString());
3030

31+
assertNotEquals(txs.get(0).toString(),txs.get(1).toString());
32+
3133
assertNotEquals(txs.get(0),txs.get(1));
3234
assertNotEquals(txs.get(0).hashCode(),txs.get(1).hashCode());
3335

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp