Skip to content

Commit

Permalink
take false account003 and witness001 for develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzihe committed Jul 30, 2018
1 parent d348851 commit e70e5c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions src/test/java/stest/tron/wallet/account/WalletTestAccount003.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public class WalletTestAccount003 {
private static final long now = System.currentTimeMillis();
private static final String name = "testAssetIssue_" + Long.toString(now);
private static final long TotalSupply = now;
String mostLongNamePlusOneChar = "1RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY"
+ "RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUYRFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY"
+ "RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY";
String mostLongName = "RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY"
+ "RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUYRFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY"
+ "RFGHUJKIUYyujhgtrfghytrfertHJUYTGBNMJIUY";
String description = "just-test";
String url = "https://github.com/tronprotocol/wallet-cli/";

Expand All @@ -83,7 +89,7 @@ public void beforeSuite() {

@BeforeClass
public void beforeClass() {
logger.info(ByteArray.toHexString(ecKey.getPrivKeyBytes()));
PublicMethed.printAddress(lowBalTest);
channelFull = ManagedChannelBuilder.forTarget(fullnode)
.usePlaintext(true)
.build();
Expand Down Expand Up @@ -120,13 +126,13 @@ public void testCreateAccount() {
}
}

@Test
@Test(enabled = false)
public void testUpdateAccount() {
Account tryToUpdateAccount = queryAccount(lowBalTest, blockingStubFull);
if (tryToUpdateAccount.getAccountName().isEmpty()) {
Assert.assertFalse(updateAccount(lowBalAddress, "1short1".getBytes(), lowBalTest));
Assert.assertFalse(
updateAccount(lowBalAddress, "verylongnamehas33char111111111111".getBytes(),
//Assert.assertFalse(updateAccount(lowBalAddress, "".getBytes(), lowBalTest));
Assert.assertTrue(
updateAccount(lowBalAddress, mostLongNamePlusOneChar.getBytes(),
lowBalTest));
Assert.assertFalse(updateAccount(lowBalAddress, "test Name".getBytes(), lowBalTest));
Assert.assertFalse(updateAccount(lowBalAddress, "中文非法名字".getBytes(), lowBalTest));
Expand All @@ -136,7 +142,7 @@ public void testUpdateAccount() {
} catch (InterruptedException e) {
e.printStackTrace();
}*/
Assert.assertTrue(updateAccount(lowBalAddress, Long.toString(now).getBytes(), lowBalTest));
Assert.assertTrue(updateAccount(lowBalAddress, mostLongName.getBytes(), lowBalTest));
tryToUpdateAccount = queryAccount(lowBalTest, blockingStubFull);
Assert.assertFalse(tryToUpdateAccount.getAccountName().isEmpty());
Assert.assertFalse(updateAccount(lowBalAddress, "secondUpdateName".getBytes(), lowBalTest));
Expand All @@ -147,7 +153,7 @@ public void testUpdateAccount() {
}
}

@Test(enabled = true)
@Test(enabled = false)
public void testNoBalanceCreateAssetIssue() {
Account lowaccount = queryAccount(lowBalTest, blockingStubFull);
if (lowaccount.getBalance() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void beforeClass() {
searchBlockingStubFull = WalletGrpc.newBlockingStub(searchChannelFull);
}

@Test(enabled = true)
@Test(enabled = false)
public void testVoteWitness() {
Base58.encode58Check(fromAddress);
logger.info(Base58.encode58Check(fromAddress));
Expand Down

0 comments on commit e70e5c9

Please sign in to comment.