Skip to content

Commit 1a75739

Browse files
modify test case
1 parent e7c82d1 commit 1a75739

File tree

5 files changed

+149
-281
lines changed

5 files changed

+149
-281
lines changed

src/test/java/stest/tron/wallet/contract/scenario/ContractScenario014.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package stest.tron.wallet.contract.scenario;
22

3+
import static org.tron.protos.Protocol.Transaction.Result.contractResult.SUCCESS_VALUE;
34

45
import io.grpc.ManagedChannel;
56
import io.grpc.ManagedChannelBuilder;
@@ -21,6 +22,8 @@
2122
import org.tron.core.Wallet;
2223
import org.tron.protos.Protocol.Account;
2324
import org.tron.protos.Protocol.SmartContract;
25+
import org.tron.protos.Protocol.Transaction;
26+
import org.tron.protos.Protocol.Transaction.Result.contractResult;
2427
import org.tron.protos.Protocol.TransactionInfo;
2528
import stest.tron.wallet.common.client.Configuration;
2629
import stest.tron.wallet.common.client.Parameter.CommonConstant;
@@ -130,7 +133,14 @@ public void testClearAbi() {
130133
Optional<TransactionInfo> infoById = null;
131134
infoById = PublicMethed.getTransactionInfoById(txid, blockingStubFull);
132135
Assert.assertEquals(0,infoById.get().getResultValue());
133-
Assert.assertEquals("SUCCESS",(infoById.get().getResMessage()).toString());
136+
Assert.assertEquals("",
137+
ByteArray.toHexString(infoById.get().getResMessage().toByteArray()));
138+
139+
Optional<Transaction> byId = PublicMethed.getTransactionById(txid, blockingStubFull);
140+
Assert.assertEquals(byId.get().getRet(0).getContractRet().getNumber(),
141+
SUCCESS_VALUE);
142+
Assert.assertEquals(byId.get().getRet(0).getContractRetValue(), SUCCESS_VALUE);
143+
Assert.assertEquals(byId.get().getRet(0).getContractRet(), contractResult.SUCCESS);
134144

135145
smartContract = PublicMethed.getContract(contractAddress, blockingStubFull);
136146
Assert.assertTrue(smartContract.getAbi().toString().isEmpty());

src/test/java/stest/tron/wallet/contract/scenario/ContractScenario015.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void testTriggerConstantContract() {
127127
logger.info(":" + ByteArray
128128
.toStr(transactionExtention.getResult().getMessage().toByteArray()));
129129
logger.info("Result:" + Hex.toHexString(result));
130-
logger.info("getCode"+transactionExtention.getResult().getCode().getNumber());
130+
logger.info("getCode" + transactionExtention.getResult().getCode().getNumber());
131131
Assert.assertEquals("SUCESS",transaction.getRet(0).getRet().toString());
132132
Assert.assertEquals(1, ByteArray.toLong(ByteArray
133133
.fromHexString(Hex

src/test/java/stest/tron/wallet/dailybuild/exceptionfee/AssertException002.java

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)