use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestWSSanity method test032ResourceNonexistingTestConnection.
@Test
public void test032ResourceNonexistingTestConnection() throws Exception {
final String TEST_NAME = "test032ResourceNonexistingTestConnection";
displayTestTitle(TEST_NAME);
try {
// WHEN
OperationResultType testResult = modelPort.testResource("56b53914-df90-11e4-8c8c-001e8c717e5b");
AssertJUnit.fail("Unexpected success");
} catch (FaultMessage f) {
assertFaultMessage(f, ObjectNotFoundFaultType.class, "was not found");
}
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestWSSanity method test111CheckJackAccountShadow.
@Test
public void test111CheckJackAccountShadow() throws Exception {
final String TEST_NAME = "test111CheckJackAccountShadow";
displayTestTitle(TEST_NAME);
Holder<ObjectType> objectHolder = new Holder<>();
Holder<OperationResultType> resultHolder = new Holder<>();
// WHEN
modelPort.getObject(ModelClientUtil.getTypeQName(ShadowType.class), accountJackOid, null, objectHolder, resultHolder);
// THEN
assertSuccess(resultHolder);
ShadowType shadow = (ShadowType) objectHolder.value;
display(shadow);
assertAttribute(shadow, ATTR_ICF_NAME_NAME, "uid=" + USER_JACK_USERNAME + "," + openDJController.getSuffixPeople());
assertAttribute(shadow, "uid", "jack");
assertAttribute(shadow, "givenName", "Jack");
assertAttribute(shadow, "sn", "Sparrow");
assertAttribute(shadow, "cn", "Jack Sparrow");
assertAttribute(shadow, "displayName", "Jack Sparrow");
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestWSSecurity method test123GetConfigAsNobodyGoodPasswordDigest.
@Test
public void test123GetConfigAsNobodyGoodPasswordDigest() throws Exception {
final String TEST_NAME = "test123GetConfigAsNobodyGoodPasswordDigest";
displayTestTitle(TEST_NAME);
LogfileTestTailer tailer = createLogTailer();
modelPort = createModelPort(USER_NOBODY_USERNAME, USER_NOBODY_PASSWORD, WSConstants.PW_DIGEST);
Holder<ObjectType> objectHolder = new Holder<ObjectType>();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
// WHEN
try {
modelPort.getObject(getTypeQName(SystemConfigurationType.class), SystemObjectsType.SYSTEM_CONFIGURATION.value(), null, objectHolder, resultHolder);
AssertJUnit.fail("Unexpected success");
} catch (SOAPFaultException e) {
assertSoapSecurityFault(e, "FailedAuthentication", "could not be authenticated or authorized");
}
tailer.tail();
assertAuditLoginFailed(tailer, "no authorizations");
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestWSSecurity method test134GetConfigAsDarthAdderGoodPasswordDigest.
@Test
public void test134GetConfigAsDarthAdderGoodPasswordDigest() throws Exception {
final String TEST_NAME = "test134GetConfigAsDarthAdderGoodPasswordDigest";
displayTestTitle(TEST_NAME);
LogfileTestTailer tailer = createLogTailer();
modelPort = createModelPort(USER_DARTHADDER_USERNAME, USER_DARTHADDER_PASSWORD, WSConstants.PW_DIGEST);
Holder<ObjectType> objectHolder = new Holder<ObjectType>();
Holder<OperationResultType> resultHolder = new Holder<OperationResultType>();
/// WHEN
modelPort.getObject(getTypeQName(SystemConfigurationType.class), SystemObjectsType.SYSTEM_CONFIGURATION.value(), null, objectHolder, resultHolder);
// THEN
assertSuccess(resultHolder);
tailer.tail();
assertAuditLoginLogout(tailer);
assertAuditIds(tailer);
tailer.assertAudit(2);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType in project midpoint by Evolveum.
the class TestWSSanity method test030ResourceOpenDjTestConnection.
@Test
public void test030ResourceOpenDjTestConnection() throws Exception {
final String TEST_NAME = "test030ResourceOpenDjTestConnection";
displayTestTitle(TEST_NAME);
ResourceType resource = ModelClientUtil.unmarshallFile(RESOURCE_OPENDJ_FILE);
// WHEN
OperationResultType testResult = modelPort.testResource(RESOURCE_OPENDJ_OID);
// THEN
display(testResult);
assertSuccess(testResult);
}
Aggregations