File tree Expand file tree Collapse file tree
framework/src/test/java/org/tron/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -552,6 +552,24 @@ public void getPaginatedExchangeList() {
552552 exchangeList .getExchangesList ().get (1 ).getCreatorAddress ().toStringUtf8 ());
553553 }
554554
555+ @ Test
556+ public void testGetExchangeById () {
557+ buildExchange ();
558+ //
559+ Exchange exchange = wallet .getExchangeById (ByteString .copyFrom (ByteArray .fromLong (1L )));
560+ Assert .assertNotNull (exchange );
561+ exchange = wallet .getExchangeById (ByteString .copyFrom (ByteArray .fromLong (3L )));
562+ Assert .assertNull (exchange );
563+ }
564+
565+ @ Test
566+ public void testGetExchangeList () {
567+ buildExchange ();
568+ //
569+ ExchangeList exchangeList = wallet .getExchangeList ();
570+ Assert .assertEquals (2 , exchangeList .getExchangesCount ());
571+ }
572+
555573 @ Test
556574 public void getBlock () {
557575 GrpcAPI .BlockReq req = GrpcAPI .BlockReq .getDefaultInstance ();
You can’t perform that action at this time.
0 commit comments