use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.
the class TestDBTable method test001Connection.
@Test
public void test001Connection() throws Exception {
final String TEST_NAME = "test001Connection";
TestUtil.displayTestTile(TEST_NAME);
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
// WHEN
OperationResult testResult = provisioningService.testResource(RESOURCE_DERBY_OID, task);
display("Test result", testResult);
TestUtil.assertSuccess("Test resource failed (result)", testResult);
ResourceType resource = repositoryService.getObject(ResourceType.class, RESOURCE_DERBY_OID, null, result).asObjectable();
display("Resource after test", resource);
display("Resource after test (XML)", PrismTestUtil.serializeObjectToString(resource.asPrismObject(), PrismContext.LANG_XML));
List<Object> nativeCapabilities = resource.getCapabilities().getNative().getAny();
CredentialsCapabilityType credentialsCapabilityType = CapabilityUtil.getCapability(nativeCapabilities, CredentialsCapabilityType.class);
assertNotNull("No credentials capability", credentialsCapabilityType);
PasswordCapabilityType passwordCapabilityType = credentialsCapabilityType.getPassword();
assertNotNull("No password in credentials capability", passwordCapabilityType);
assertEquals("Wrong password capability ReturnedByDefault", Boolean.FALSE, passwordCapabilityType.isReturnedByDefault());
}
use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.
the class AbstractBasicDummyTest method assertNativeCredentialsCapability.
protected void assertNativeCredentialsCapability(CredentialsCapabilityType capCred) {
PasswordCapabilityType passwordCapabilityType = capCred.getPassword();
assertNotNull("password native capability not present", passwordCapabilityType);
Boolean readable = passwordCapabilityType.isReadable();
if (readable != null) {
assertFalse("Unexpected 'readable' in password capability", readable);
}
}
use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.PasswordCapabilityType in project midpoint by Evolveum.
the class TestDummyIncomplete method assertNativeCredentialsCapability.
@Override
protected void assertNativeCredentialsCapability(CredentialsCapabilityType capCred) {
PasswordCapabilityType passwordCapabilityType = capCred.getPassword();
assertNotNull("password native capability not present", passwordCapabilityType);
Boolean readable = passwordCapabilityType.isReadable();
assertNotNull("No 'readable' inducation in password capability", readable);
assertTrue("Password not 'readable' in password capability", readable);
}
Aggregations