Skip to content

Commit 8efbd87

Browse files
committed
add test case of WalletTest
1 parent e70ef1b commit 8efbd87

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
import org.tron.core.store.AccountStore;
7474
import org.tron.keystore.Credentials;
7575
import org.tron.keystore.WalletUtils;
76-
import org.tron.p2p.P2pConfig;
7776
import org.tron.p2p.dns.update.DnsType;
7877
import org.tron.p2p.dns.update.PublishConfig;
7978
import org.tron.p2p.utils.NetUtil;

framework/src/test/java/org/tron/core/WalletTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,16 @@ public void getPaginatedProposalList() {
532532

533533
}
534534

535+
@Test
536+
public void testGetProposalById() {
537+
buildProposal();
538+
//
539+
Proposal proposal = wallet.getProposalById(ByteString.copyFrom(ByteArray.fromLong(1L)));
540+
Assert.assertNotNull(proposal);
541+
proposal = wallet.getProposalById(ByteString.copyFrom(ByteArray.fromLong(3L)));
542+
Assert.assertNull(proposal);
543+
}
544+
535545
@Test
536546
public void getPaginatedExchangeList() {
537547
buildExchange();

0 commit comments

Comments
 (0)