use of com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition in project midpoint by Evolveum.
the class TestPreviewChanges method test150GetGuybrushRefinedObjectClassDef.
@Test
public void test150GetGuybrushRefinedObjectClassDef() throws Exception {
final String TEST_NAME = "test150GetGuybrushRefinedObjectClassDef";
TestUtil.displayTestTile(this, TEST_NAME);
// GIVEN
Task task = taskManager.createTaskInstance(TestPreviewChanges.class.getName() + "." + TEST_NAME);
OperationResult result = task.getResult();
PrismObject<ShadowType> shadow = getShadowModel(ACCOUNT_SHADOW_GUYBRUSH_OID);
// WHEN
RefinedObjectClassDefinition rOCDef = modelInteractionService.getEditObjectClassDefinition(shadow, getDummyResourceObject(), AuthorizationPhaseType.REQUEST);
// THEN
result.computeStatus();
TestUtil.assertSuccess(result);
display("Refined object class", rOCDef);
assertNotNull("Null config", rOCDef);
display("Password credentials outbound", rOCDef.getPasswordOutbound());
assertNotNull("Assert not null", rOCDef.getPasswordOutbound());
}
use of com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition in project midpoint by Evolveum.
the class TestDummyExtra method assertSchemaSanity.
@Override
protected void assertSchemaSanity(ResourceSchema resourceSchema, ResourceType resourceType) throws Exception {
// schema is extended, displayOrders are changed
dummyResourceCtl.assertDummyResourceSchemaSanityExtended(resourceSchema, resourceType, false, 18);
RefinedResourceSchema refinedSchema = RefinedResourceSchemaImpl.getRefinedSchema(resource);
RefinedObjectClassDefinition accountRDef = refinedSchema.getDefaultRefinedDefinition(ShadowKindType.ACCOUNT);
Collection<RefinedAssociationDefinition> associationDefinitions = accountRDef.getAssociationDefinitions();
assertEquals("Wrong number of association defs", 3, associationDefinitions.size());
RefinedAssociationDefinition crewAssociationDef = accountRDef.findAssociationDefinition(ASSOCIATION_CREW_NAME);
assertNotNull("No definitin for crew assocation", crewAssociationDef);
}
Aggregations