protected void assertSituation(PrismObject<ShadowType> shadow, SynchronizationSituationType expectedSituation) { if (expectedSituation == null) { PrismAsserts.assertNoItem(shadow, ShadowType.F_SYNCHRONIZATION_SITUATION); } else { PrismAsserts.assertPropertyValue(shadow, ShadowType.F_SYNCHRONIZATION_SITUATION, expectedSituation); } }
protected void assertUserProperty(PrismObject<UserType> user, QName propertyName, Object... expectedPropValues) { PrismProperty<Object> property = user.findProperty(ItemName.fromQName(propertyName)); assert property != null : "No property "+propertyName+" in "+user; PrismAsserts.assertPropertyValue(property, expectedPropValues); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); } }
public static <T> void assertPropertyValue(PrismContainer<?> container, ItemPath propPath, T... realPropValues) { PrismContainerValue<?> containerValue = container.getValue(); assertSame("Wrong parent for value of container "+container, container, containerValue.getParent()); assertPropertyValue(containerValue, propPath, realPropValues); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
protected void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propItemName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propItemName, propValue); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
public static <T> void assertPropertyValues(PrismContainer<?> container, String propName, T... expectedValues) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, expectedValues); }
protected <T> void assertPropertyValues(PrismContainer<?> container, String propName, T... expectedValues) { ItemName propItemName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propItemName, expectedValues); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(SchemaConstantsGenerated.NS_COMMON, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
public static void assertPropertyValue(PrismContainer<?> container, String propName, Object propValue) { ItemName propQName = new ItemName(NS_FOO, propName); PrismAsserts.assertPropertyValue(container, propQName, propValue); }
protected PrismObject<OrgType> getOrg(String orgName) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<OrgType> org = findObjectByName(OrgType.class, orgName); assertNotNull("The org "+orgName+" is missing!", org); display("Org "+orgName, org); PrismAsserts.assertPropertyValue(org, OrgType.F_NAME, createPolyString(orgName)); return org; }
private PrismObject<UserType> assertAlmostFullJackRead(int expectedTargetAssignments) throws Exception { PrismObject<UserType> userJack = getUser(USER_JACK_OID); display("Jack", userJack); PrismAsserts.assertPropertyValue(userJack, UserType.F_NAME, PrismTestUtil.createPolyString(USER_JACK_USERNAME)); PrismAsserts.assertPropertyValue(userJack, UserType.F_FULL_NAME, PrismTestUtil.createPolyString(USER_JACK_FULL_NAME)); PrismAsserts.assertPropertyValue(userJack, UserType.F_GIVEN_NAME, createPolyString(USER_JACK_GIVEN_NAME)); PrismAsserts.assertPropertyValue(userJack, SchemaConstants.PATH_ACTIVATION_EFFECTIVE_STATUS, ActivationStatusType.ENABLED); assertAssignmentsWithTargets(userJack, expectedTargetAssignments); // assertJackEditSchemaReadSomeModifySome(userJack); return userJack; }
protected void assertShadowLifecycle(PrismObject<ShadowType> shadow, String expectedLifecycle) { if (expectedLifecycle == null) { String actualLifecycle = shadow.asObjectable().getLifecycleState(); if (actualLifecycle != null && !SchemaConstants.LIFECYCLE_ACTIVE.equals(actualLifecycle)) { fail("Expected default lifecycle for "+shadow+", but was "+actualLifecycle); } } else { PrismAsserts.assertPropertyValue(shadow, ObjectType.F_LIFECYCLE_STATE, expectedLifecycle); } }
protected void assertUserJackReadSomeModifySome(PrismObject<UserType> userJack, int exprectedJackAssignments) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException { PrismAsserts.assertPropertyValue(userJack, UserType.F_NAME, PrismTestUtil.createPolyString(USER_JACK_USERNAME)); PrismAsserts.assertPropertyValue(userJack, UserType.F_FULL_NAME, PrismTestUtil.createPolyString(USER_JACK_FULL_NAME)); PrismAsserts.assertPropertyValue(userJack, ItemPath.create(UserType.F_ACTIVATION, ActivationType.F_ADMINISTRATIVE_STATUS), ActivationStatusType.ENABLED); PrismAsserts.assertNoItem(userJack, UserType.F_GIVEN_NAME); PrismAsserts.assertNoItem(userJack, UserType.F_FAMILY_NAME); PrismAsserts.assertNoItem(userJack, UserType.F_ADDITIONAL_NAME); PrismAsserts.assertNoItem(userJack, UserType.F_DESCRIPTION); PrismAsserts.assertNoItem(userJack, ItemPath.create(UserType.F_ACTIVATION, ActivationType.F_EFFECTIVE_STATUS)); assertAssignmentsWithTargets(userJack, exprectedJackAssignments); }
private PrismObject<OrgType> assertOnDemandOrgExists(String orgName) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<OrgType> org = findObjectByName(OrgType.class, orgName); assertNotNull("The org "+orgName+" is missing!", org); display("Org "+orgName, org); PrismAsserts.assertPropertyValue(org, OrgType.F_NAME, PrismTestUtil.createPolyString(orgName)); return org; }
private <T> void assertAttribute(PrismObject<ShadowType> shadow, QName attrQName, T... expectedValues) { PrismProperty<T> attr = shadow.findProperty(ItemPath.create(ShadowType.F_ATTRIBUTES, attrQName)); if (expectedValues.length == 0) { assertTrue("Expected no value for attribute "+attrQName+" in "+shadow+", but it has "+attr, attr == null); } else { assertNotNull("No attribute "+attrQName+" in "+shadow, attr); PrismAsserts.assertPropertyValue(attr, expectedValues); } }
private void assertOnDemandOrgAssigned(String orgName, PrismObject<UserType> user) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<OrgType> org = assertOnDemandOrgExists(orgName); PrismAsserts.assertPropertyValue(org, OrgType.F_DESCRIPTION, "Created on demand from user "+user.asObjectable().getName()); assertAssignedOrg(user, org.getOid()); assertHasOrg(user, org.getOid()); }