forked from nervosnetwork/ckb-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAccountInfoTest.java
24 lines (20 loc) · 890 Bytes
/
AccountInfoTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package mercury;
import constant.AddressWithKeyHolder;
import constant.ApiFactory;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.nervos.mercury.model.AccountInfoPayloadBuilder;
import org.nervos.mercury.model.common.AssetInfo;
import org.nervos.mercury.model.req.item.ItemFactory;
import java.io.IOException;
public class AccountInfoTest {
@Test
public void testGetAccountInfo() throws IOException {
AccountInfoPayloadBuilder builder = new AccountInfoPayloadBuilder();
builder.item(ItemFactory.newIdentityItemByCkb(AddressWithKeyHolder.testPubKey4()));
builder.assetInfo(AssetInfo.newCkbAsset());
org.nervos.mercury.model.resp.AccountInfo accountInfo = ApiFactory.getApi().getAccountInfo(builder.build());
Assertions.assertNotNull(accountInfo.accountAddress);
Assertions.assertNotNull(accountInfo.accountType);
}
}