@Test public void testCreateAndRemoveAccount() { skipIfNotGlobalAdmin(); Account account = null; try { account = createTestAccount(globalAdminClient, prefix); assertNotNull(account); assertEquals(account.getName(), prefix + "-account"); assertEquals(account.getType(), Account.Type.USER); Account updated = globalAdminClient.getAccountClient().updateAccount( account.getName(), account.getDomainId(), prefix + "-account-2"); assertNotNull(updated); assertEquals(updated.getName(), prefix + "-account-2"); } finally { if (account != null) { globalAdminClient.getAccountClient().deleteAccount(account.getId()); } } }
@Test public void testCreateAndRemoveAccount() { skipIfNotGlobalAdmin(); Account account = null; try { account = createTestAccount(globalAdminClient, prefix); assertNotNull(account); assertEquals(account.getName(), prefix + "-account"); assertEquals(account.getType(), Account.Type.USER); Account updated = globalAdminClient.getAccountApi().updateAccount( account.getName(), account.getDomainId(), prefix + "-account-2"); assertNotNull(updated); assertEquals(updated.getName(), prefix + "-account-2"); } finally { if (account != null) { globalAdminClient.getAccountApi().deleteAccount(account.getId()); } } }
assertEquals(account.toString(), client.getAccountClient().getAccount(account.getId()).toString()); assert account.getName() != null : account; assert account.getType() != null && account.getType() != Account.Type.UNRECOGNIZED : account; assert account.getDomain() != null : account; assert account.getDomainId() != null : account; for (User user : account.getUsers()) { assert user.getName() != null : user; assert user.getAccountType().equals(account.getType()) : user; assert user.getDomain().equals(account.getDomain()) : user; assert user.getDomainId().equals(account.getDomainId()) : user;
assertEquals(account.toString(), client.getAccountApi().getAccount(account.getId()).toString()); assert account.getName() != null : account; assert account.getType() != null && account.getType() != Account.Type.UNRECOGNIZED : account; assert account.getDomain() != null : account; assert account.getDomainId() != null : account; for (User user : account.getUsers()) { assert user.getName() != null : user; assert user.getAccountType().equals(account.getType()) : user; assert user.getDomain().equals(account.getDomain()) : user; assert user.getDomainId().equals(account.getDomainId()) : user;
public T fromAccount(Account in) { return this .id(in.getId()) .type(in.getType()) .networkDomain(in.getNetworkDomain()) .domain(in.getDomain())
public T fromAccount(Account in) { return this .id(in.getId()) .type(in.getType()) .networkDomain(in.getNetworkDomain()) .domain(in.getDomain())
public T fromAccount(Account in) { return this .id(in.getId()) .type(in.getType()) .networkDomain(in.getNetworkDomain()) .domain(in.getDomain())