use of org.tron.protos.Protocol.Account.Vote in project java-tron by tronprotocol.
the class AccountCapsuleTest method addVotesTest.
@Test
public void addVotesTest() {
// test addVote and getVotesList function
ByteString voteAddress = ByteString.copyFrom(AccountCapsuleTest.randomBytes(32));
long voteAdd = 10L;
accountCapsuleTest.addVotes(voteAddress, voteAdd);
List<Vote> votesList = accountCapsuleTest.getVotesList();
for (Vote vote : votesList) {
Assert.assertEquals(voteAddress, vote.getVoteAddress());
Assert.assertEquals(voteAdd, vote.getVoteCount());
}
}
Aggregations