@@ -583,8 +583,9 @@ public void assetNameTest() {
583583 }
584584
585585 //Contain chinese character, throw exception.
586- assetName = "测试" ;
587- actuator = new ParticipateAssetIssueActuator (getContract (1000L , assetName ), dbManager );
586+ actuator = new ParticipateAssetIssueActuator (
587+ getContract (1000L , ByteString .copyFrom (ByteArray .fromHexString ("E6B58BE8AF95" ))),
588+ dbManager );
588589 ret = new TransactionResultCapsule ();
589590 try {
590591 actuator .validate ();
@@ -824,39 +825,39 @@ public void multiplyOverflowTest() {
824825 }
825826
826827 /**
827- * exchangeAmount <= 0 trx, throw exception
828+ * exchangeAmount <= 0 trx, throw exception
828829 */
829830 @ Test
830831 public void exchangeAmountTest () {
831832
832833 dbManager .getDynamicPropertiesStore ().saveLatestBlockHeaderTimestamp (1000000 );
833834 AssetIssueContract assetIssueContract =
834- AssetIssueContract .newBuilder ()
835- .setOwnerAddress (ByteString .copyFrom (ByteArray .fromHexString (TO_ADDRESS )))
836- .setName (ByteString .copyFrom (ByteArray .fromString (ASSET_NAME )))
837- .setTotalSupply (TOTAL_SUPPLY )
838- .setTrxNum (100 )
839- .setNum (1 )
840- .setStartTime (dbManager .getHeadBlockTimeStamp () - 10000 )
841- .setEndTime (dbManager .getHeadBlockTimeStamp () + 11000000 )
842- .setVoteScore (VOTE_SCORE )
843- .setDescription (ByteString .copyFrom (ByteArray .fromString (DESCRIPTION )))
844- .setUrl (ByteString .copyFrom (ByteArray .fromString (URL )))
845- .build ();
835+ AssetIssueContract .newBuilder ()
836+ .setOwnerAddress (ByteString .copyFrom (ByteArray .fromHexString (TO_ADDRESS )))
837+ .setName (ByteString .copyFrom (ByteArray .fromString (ASSET_NAME )))
838+ .setTotalSupply (TOTAL_SUPPLY )
839+ .setTrxNum (100 )
840+ .setNum (1 )
841+ .setStartTime (dbManager .getHeadBlockTimeStamp () - 10000 )
842+ .setEndTime (dbManager .getHeadBlockTimeStamp () + 11000000 )
843+ .setVoteScore (VOTE_SCORE )
844+ .setDescription (ByteString .copyFrom (ByteArray .fromString (DESCRIPTION )))
845+ .setUrl (ByteString .copyFrom (ByteArray .fromString (URL )))
846+ .build ();
846847 AssetIssueCapsule assetIssueCapsule = new AssetIssueCapsule (assetIssueContract );
847848 dbManager .getAssetIssueStore ()
848- .put (assetIssueCapsule .getName ().toByteArray (), assetIssueCapsule );
849+ .put (assetIssueCapsule .getName ().toByteArray (), assetIssueCapsule );
849850
850851 AccountCapsule toAccountCapsule = dbManager .getAccountStore ()
851- .get (ByteArray .fromHexString (TO_ADDRESS ));
852+ .get (ByteArray .fromHexString (TO_ADDRESS ));
852853 toAccountCapsule .addAsset (ASSET_NAME , TOTAL_SUPPLY );
853854 dbManager .getAccountStore ().put (toAccountCapsule .getAddress ().toByteArray (), toAccountCapsule );
854855 AccountCapsule owner = dbManager .getAccountStore ().get (ByteArray .fromHexString (OWNER_ADDRESS ));
855856 owner .setBalance (100000000000000L );
856857 dbManager .getAccountStore ().put (owner .getAddress ().toByteArray (), owner );
857858
858859 ParticipateAssetIssueActuator actuator = new ParticipateAssetIssueActuator (getContract (1 ),
859- dbManager );
860+ dbManager );
860861
861862 TransactionResultCapsule ret = new TransactionResultCapsule ();
862863 try {
0 commit comments