protected DummyAccount getDummyAccountById(String dummyInstanceName, String id) throws SchemaViolationException, ConflictException, InterruptedException { DummyResource dummyResource = DummyResource.getInstance(dummyInstanceName); try { return dummyResource.getAccountById(id); } catch (ConnectException e) { throw new IllegalStateException(e.getMessage(),e); } catch (FileNotFoundException e) { throw new IllegalStateException(e.getMessage(),e); } }
public DummyAccountAsserter<Void> assertAccountById(String id) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { DummyAccount account = dummyResource.getAccountById(id); assertNotNull("Account id="+id+" does not exist on dummy resource "+getName()); return assertAccount(account); }
protected DummyAccount getDummyAccount(String icfName, String icfUid) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { if (isIcfNameUidSame()) { return dummyResource.getAccountByUsername(icfName); } else { return dummyResource.getAccountById(icfUid); } }
protected void assertNoDummyAccount(String icfName, String icfUid) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { DummyAccount account; if (isIcfNameUidSame()) { account = dummyResource.getAccountByUsername(icfName); } else { account = dummyResource.getAccountById(icfUid); } assertNull("Unexpected dummy account with ICF UID "+icfUid+" (name "+icfName+")", account); }
protected DummyAccount getDummyAccountAssert(String icfName, String icfUid) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException { if (isIcfNameUidSame()) { return dummyResource.getAccountByUsername(icfName); } else { DummyAccount account = dummyResource.getAccountById(icfUid); assertNotNull("No dummy account with ICF UID "+icfUid+" (expected name "+icfName+")", account); assertEquals("Unexpected name in "+account, icfName, account.getName()); return account; } }
DummyAccount account = resource.getAccountById(delta.getObjectId()); if (account == null) {
account = resource.getAccountByUsername(uid.getUidValue()); } else if (configuration.getUidMode().equals(DummyConfiguration.UID_MODE_UUID)) { account = resource.getAccountById(uid.getUidValue()); } else { throw new IllegalStateException("Unknown UID mode "+configuration.getUidMode());
account = resource.getAccountByUsername(uid.getUidValue()); } else if (configuration.getUidMode().equals(DummyConfiguration.UID_MODE_UUID)) { account = resource.getAccountById(uid.getUidValue()); } else { throw new IllegalStateException("Unknown UID mode "+configuration.getUidMode());
account = resource.getAccountByUsername(uid.getUidValue(), false); } else if (configuration.getUidMode().equals(DummyConfiguration.UID_MODE_UUID)) { account = resource.getAccountById(uid.getUidValue(), false); } else { throw new IllegalStateException("Unknown UID mode "+configuration.getUidMode());
account = resource.getAccountByUsername(uid.getUidValue(), false); } else if (configuration.getUidMode().equals(DummyConfiguration.UID_MODE_UUID)) { account = resource.getAccountById(uid.getUidValue(), false); } else { throw new IllegalStateException("Unknown UID mode "+configuration.getUidMode());