Search in sources :

Example 1 with BasicAccount

use of com.dropbox.core.v2.users.BasicAccount in project dropbox-sdk-java by dropbox.

the class Main method testBasicSerialization.

private static void testBasicSerialization(DbxClientV2 client) throws DbxException, IOException {
    // Make the /account/info API call.
    FullAccount expected = client.users().getCurrentAccount();
    assertNotNull(expected);
    String accountId = expected.getAccountId();
    assertNotNull(accountId);
    assertNotNull(expected.getName());
    BasicAccount actual = client.users().getAccount(accountId);
    assertNotNull(actual);
    assertEquals(actual.getAccountId(), expected.getAccountId());
    assertEquals(actual.getEmail(), expected.getEmail());
}
Also used : BasicAccount(com.dropbox.core.v2.users.BasicAccount) FullAccount(com.dropbox.core.v2.users.FullAccount)

Example 2 with BasicAccount

use of com.dropbox.core.v2.users.BasicAccount in project dropbox-sdk-java by dropbox.

the class DbxClientV2IT method testAccountInfo.

@Test
public void testAccountInfo() throws Exception {
    DbxClientV2 client = ITUtil.newClientV2();
    FullAccount full = client.users().getCurrentAccount();
    assertNotNull(full);
    assertNotNull(full.getName());
    assertNotNull(full.getAccountId());
    BasicAccount basic = client.users().getAccount(full.getAccountId());
    assertNotNull(basic);
    assertNotNull(basic.getName());
    assertEquals(basic.getAccountId(), full.getAccountId());
}
Also used : BasicAccount(com.dropbox.core.v2.users.BasicAccount) FullAccount(com.dropbox.core.v2.users.FullAccount) Test(org.testng.annotations.Test)

Aggregations

BasicAccount (com.dropbox.core.v2.users.BasicAccount)2 FullAccount (com.dropbox.core.v2.users.FullAccount)2 Test (org.testng.annotations.Test)1