Skip to content

Commit

Permalink
Cleaned up and added logs message where missing token or token_account
Browse files Browse the repository at this point in the history
Signed-off-by: Nana-EC <56320167+Nana-EC@users.noreply.github.com>
  • Loading branch information
Nana-EC committed Oct 6, 2020
1 parent c26d0c6 commit 80d726b
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void tokenUpdateWithMissingToken() throws InvalidProtocolBufferException {
}

@Test
void tokenAccountUpdate() throws InvalidProtocolBufferException {
void tokenUpdate() throws InvalidProtocolBufferException {
createAndAssociateToken(TOKEN_ID, SYMBOL, CREATE_TIMESTAMP, ASSOCIATE_TIMESTAMP, PAYER, false, false);

String newSymbol = "NEWSYMBOL";
Expand All @@ -198,6 +198,21 @@ void tokenAccountUpdate() throws InvalidProtocolBufferException {
assertTokenInRepository(TOKEN_ID, true, CREATE_TIMESTAMP, updateTimeStamp, newSymbol);
}

@Test
void tokenUpdateWithMissingToken() throws InvalidProtocolBufferException {
String newSymbol = "NEWSYMBOL";
Transaction transaction = tokenUpdateTransaction(
TOKEN_ID,
newSymbol,
keyFromString("updated-key"),
AccountID.newBuilder().setShardNum(0).setRealmNum(0).setAccountNum(2002).build());
long updateTimeStamp = 10L;
insertAndParseTransaction(transaction, updateTimeStamp, null);

// verify token was not created when missing
assertTokenInRepository(TOKEN_ID, false, CREATE_TIMESTAMP, ASSOCIATE_TIMESTAMP, SYMBOL);
}

@Test
void tokenAccountFreeze() throws InvalidProtocolBufferException {
createAndAssociateToken(TOKEN_ID, SYMBOL, CREATE_TIMESTAMP, ASSOCIATE_TIMESTAMP, PAYER, true, false);
Expand Down

0 comments on commit 80d726b

Please sign in to comment.