@@ -168,6 +168,31 @@ void txBuilder() {
168
168
assertTrue (value .haveError ());
169
169
assertEquals ("1" , value .getTo ());
170
170
assertEquals ("1" , value .getFrom ());
171
+
172
+ Tx value2 = Tx .builder ()
173
+ .withBlockHash ("1" )
174
+ .withBlockNumber (1L )
175
+ .withConfirmations (1L )
176
+ .withContractAddress ("1" )
177
+ .withFrom ("1" )
178
+ .withTo ("1" )
179
+ .withCumulativeGasUsed (Wei .ofWei (BigInteger .ONE ))
180
+ .withGas (Wei .ofWei (BigInteger .ONE ))
181
+ .withGasPrice (Wei .ofWei (BigInteger .ONE ))
182
+ .withGasUsed (Wei .ofWei (BigInteger .ONE ))
183
+ .withHash ("1" )
184
+ .withInput ("1" )
185
+ .withIsError ("1" )
186
+ .withNonce (1L )
187
+ .withTimeStamp (timestamp )
188
+ .withValue (BigInteger .ONE )
189
+ .withTransactionIndex (1 )
190
+ .withTxReceiptStatus ("1" )
191
+ .build ();
192
+
193
+ assertEquals (value , value2 );
194
+ assertEquals (value .hashCode (), value2 .hashCode ());
195
+ assertEquals (value .toString (), value2 .toString ());
171
196
}
172
197
173
198
@ Test
@@ -258,6 +283,32 @@ void txErc1155Builder() {
258
283
assertNotNull (value );
259
284
assertEquals ("1" , value .getTo ());
260
285
assertEquals ("1" , value .getFrom ());
286
+
287
+ TxErc1155 value2 = TxErc1155 .builder ()
288
+ .withBlockHash ("1" )
289
+ .withBlockNumber (1L )
290
+ .withConfirmations (1L )
291
+ .withContractAddress ("1" )
292
+ .withFrom ("1" )
293
+ .withTo ("1" )
294
+ .withCumulativeGasUsed (Wei .ofWei (BigInteger .ONE ))
295
+ .withGas (Wei .ofWei (BigInteger .ONE ))
296
+ .withGasPrice (Wei .ofWei (BigInteger .ONE ))
297
+ .withGasUsed (Wei .ofWei (BigInteger .ONE ))
298
+ .withHash ("1" )
299
+ .withInput ("1" )
300
+ .withTokenName ("1" )
301
+ .withTokenSymbol ("1" )
302
+ .withTokenDecimal ("1" )
303
+ .withTokenID ("1" )
304
+ .withNonce (1L )
305
+ .withTimeStamp (timestamp )
306
+ .withTransactionIndex (1 )
307
+ .build ();
308
+
309
+ assertEquals (value , value2 );
310
+ assertEquals (value .hashCode (), value2 .hashCode ());
311
+ assertEquals (value .toString (), value2 .toString ());
261
312
}
262
313
263
314
@ Test
@@ -283,6 +334,27 @@ void txInternalBuilder() {
283
334
assertNotNull (value );
284
335
assertEquals ("1" , value .getTo ());
285
336
assertEquals ("1" , value .getFrom ());
337
+
338
+ TxInternal value2 = TxInternal .builder ()
339
+ .withBlockNumber (1L )
340
+ .withContractAddress ("1" )
341
+ .withFrom ("1" )
342
+ .withTo ("1" )
343
+ .withValue (BigInteger .ONE )
344
+ .withGas (Wei .ofWei (BigInteger .ONE ))
345
+ .withGasUsed (Wei .ofWei (BigInteger .ONE ))
346
+ .withHash ("1" )
347
+ .withInput ("1" )
348
+ .withTimeStamp (timestamp )
349
+ .withErrCode ("1" )
350
+ .withIsError (1 )
351
+ .withTraceId ("1" )
352
+ .withType ("1" )
353
+ .build ();
354
+
355
+ assertEquals (value , value2 );
356
+ assertEquals (value .hashCode (), value2 .hashCode ());
357
+ assertEquals (value .toString (), value2 .toString ());
286
358
}
287
359
288
360
@ Test
0 commit comments