use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class AbstractTestForExchangeConnector method getConfiguration.
protected SystemConfigurationType getConfiguration() throws FaultMessage {
Holder<ObjectType> objectHolder = new Holder<ObjectType>();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType();
modelPort.getObject(ModelClientUtil.getTypeQName(SystemConfigurationType.class), SystemObjectsType.SYSTEM_CONFIGURATION.value(), options, objectHolder, resultHolder);
return (SystemConfigurationType) objectHolder.value;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestExchangeAlreadyExistsHandling method test140CreateWilburWrightConflictOnUserPrincipalName.
@Test
public void test140CreateWilburWrightConflictOnUserPrincipalName() throws Exception {
System.out.println("Creating account for Wilbur Wright, should create a conflict on userPrincipalName...");
String oid = createAccount("Wilbur", "Wright", dn("Wilbur", "Wright"), "User", null, "wright1", "wright@test.uniba.local", false);
System.out.println("Done; OID = " + oid);
OperationResultType result = lastOdo.getExecutionResult();
String message = result.getMessage();
assertTrue("Result should not be SUCCESS", result.getStatus() != OperationResultStatusType.SUCCESS);
assertTrue("Message should contain AlreadyExistsException; it is " + message + " instead", message.contains("AlreadyExistsException"));
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestExchangeAlreadyExistsHandling method test120CreateWilburWrightConflictOnSamAccountName.
@Test
public void test120CreateWilburWrightConflictOnSamAccountName() throws Exception {
System.out.println("Creating account for Wilbur Wright, should create a conflict on samAccountName...");
wilburOid = createAccount("Wilbur", "Wright", dn("Wilbur", "Wright"), "User", null, "wright", null, false);
System.out.println("Done; OID = " + wilburOid);
OperationResultType result = lastOdo.getExecutionResult();
String message = result.getMessage();
assertTrue("Result should not be SUCCESS", result.getStatus() != OperationResultStatusType.SUCCESS);
assertTrue("Message should contain AlreadyExistsException; it is " + message + " instead", message.contains("AlreadyExistsException"));
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestExchangeConnectorLow method test150CreateHuygensConflicting.
@Test
public void test150CreateHuygensConflicting() throws Exception {
String mail = "pascal@clermont-ferrand.fr";
System.out.println("Creating account for Huygens...");
ObjectDeltaOperationType odo = createAccountOdo(HUYGENS_GIVEN_NAME, HUYGENS_SN, dn(HUYGENS_GIVEN_NAME, HUYGENS_SN), "UserMailbox", mail);
OperationResultType result = odo.getExecutionResult();
System.out.println("Done; status = " + result.getStatus() + ":" + result.getMessage());
// ShadowType huygens = checkAccount(HUYGENS_GIVEN_NAME, HUYGENS_SN, dn(HUYGENS_GIVEN_NAME, HUYGENS_SN), getContainer());
// Map<String,Object> attrs = getAttributesAsMap(pascal);
// assertAttributeEquals(attrs, "RecipientType", "UserMailbox");
// assertAttributeExists(attrs, "homeMDB");
// assertAttributeEquals(attrs, "PrimarySmtpAddress", mail);
// assertAttributeEquals(attrs, "mail", mail);
// assertAttributeEquals(attrs, "Alias", PASCAL_SN.toLowerCase());
// assertAttributeContains(attrs, "EmailAddresses", "SMTP:" + mail); // FIXME
// assertAttributeEquals(attrs, "EmailAddressPolicyEnabled", "true");
// assertAttributeEquals(attrs, "msExchRecipientDisplayType", "1073741824");
// assertAttributeEquals(attrs, "msExchRecipientTypeDetails", "1");
// assertAttributeEquals(attrs, "displayName", PASCAL_GIVEN_NAME + " " + PASCAL_SN);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestSanityLegacy method test015AccountOwner.
@Test
public void test015AccountOwner() throws FaultMessage, ObjectNotFoundException, SchemaException, JAXBException {
TestUtil.displayTestTile("test015AccountOwner");
// GIVEN
checkRepoOpenDjResource();
assertNoRepoCache();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
Holder<UserType> userHolder = new Holder<UserType>();
// WHEN
modelWeb.findShadowOwner(accountShadowOidOpendj, userHolder, resultHolder);
// THEN
display("listAccountShadowOwner result", resultHolder.value);
TestUtil.assertSuccess("listAccountShadowOwner has failed (result)", resultHolder.value);
UserType user = userHolder.value;
assertNotNull("No owner", user);
assertEquals(USER_JACK_OID, user.getOid());
System.out.println("Account " + accountShadowOidOpendj + " has owner " + ObjectTypeUtil.toShortString(user));
}
Aggregations