public ShadowAsserter<RA> assertBasicRepoProperties() { assertOid(); assertName(); assertObjectClass(); attributes().assertAny(); return this; }
.target() .assertName(USER_SKELLINGTON_GIVEN_NAME) .attributes() .assertValue(SchemaConstants.ICFS_NAME, USER_SKELLINGTON_GIVEN_NAME) .getValue(SchemaConstants.ICFS_UID);
@Test public void test100AssignAccountToJackSparrow() throws Exception { final String TEST_NAME = "test100AssignAccountToJackSparrow"; displayTestTitle(TEST_NAME); // GIVEN Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); // WHEN displayWhen(TEST_NAME); assignAccountToUser(USER_JACK_OID, RESOURCE_DUMMY_UUID_NONUNIQUE_NAME_OID, null, task, result); // THEN displayThen(TEST_NAME); assertSuccess(result); accountJackSparrowUid = assertUserAfter(USER_JACK_OID) .singleLink() .target() .assertName(USER_JACK_GIVEN_NAME) .attributes() .assertValue(SchemaConstants.ICFS_NAME, USER_JACK_GIVEN_NAME) .getValue(SchemaConstants.ICFS_UID); assertDummyAccountById(RESOURCE_DUMMY_UUID_NONUNIQUE_NAME_NAME, accountJackSparrowUid) .assertName(USER_JACK_GIVEN_NAME) .assertId(accountJackSparrowUid) .assertFullName(USER_JACK_FULL_NAME); assertFalse("Same sparrow's name and uid", USER_JACK_GIVEN_NAME.equals(accountJackSparrowUid)); }
@Test public void test102GetAccountJackSparrow() throws Exception { final String TEST_NAME = "test102GetAccountJackSparrow"; displayTestTitle(TEST_NAME); // GIVEN Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); String accountJackSparrowOid = assertUserBefore(USER_JACK_OID) .singleLink() .getOid(); // WHEN displayWhen(TEST_NAME); PrismObject<ShadowType> shadow = modelService.getObject(ShadowType.class, accountJackSparrowOid, null, task, result); // THEN displayThen(TEST_NAME); assertSuccess(result); assertShadow(shadow, "getObject") .assertName(USER_JACK_GIVEN_NAME) .attributes() .assertValue(SchemaConstants.ICFS_NAME, USER_JACK_GIVEN_NAME) .assertValue(SchemaConstants.ICFS_UID, accountJackSparrowUid) .assertHasPrimaryIdentifier() .assertNoSecondaryIdentifier(); }
.assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE) .assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE)
.end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end(); .assertName(USER_WILL_NAME) .assertKind(ShadowKindType.ACCOUNT) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end(); .assertLife() .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME) .end()
.assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE) .assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE)
.assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE); .assertKind(ShadowKindType.ACCOUNT) .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE)
.assertIsExists() .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME) .end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertNoAttribute(ATTR_DESCRIPTION_QNAME)
.assertTombstone() .assertNoLegacyConsistency() .attributes() .assertAttributes(SchemaConstants.ICFS_NAME, SchemaConstants.ICFS_UID) .end() .assertTombstone() .assertNoLegacyConsistency() .attributes() .assertResourceAttributeContainer() .assertHasPrimaryIdentifier()
.end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end(); .assertName(USER_WILL_NAME) .assertKind(ShadowKindType.ACCOUNT) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end()
.assertNotDead() .assertNoLegacyConsistency() .attributes() .assertAttributes(SchemaConstants.ICFS_NAME) .end() .assertNotDead() .assertNoLegacyConsistency() .attributes() .assertResourceAttributeContainer() .assertNoPrimaryIdentifier() .assertNotDead() .assertNoLegacyConsistency() .attributes() .assertResourceAttributeContainer() .assertNoPrimaryIdentifier()
.end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end() .assertLife() .assertAdministrativeStatus(ActivationStatusType.ENABLED) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertValue(ATTR_FULLNAME_QNAME, USER_WILL_FULL_NAME_PIRATE)
.end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end() .assertKind(ShadowKindType.ACCOUNT) .assertConception() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end()
.end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end(); .assertName(USER_WILL_NAME) .assertKind(ShadowKindType.ACCOUNT) .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end()
.oldShadow() .assertOid(corsairsShadowOid) .attributes() .assertAttributes(SchemaConstants.ICFS_NAME, SchemaConstants.ICFS_UID) .assertValue(SchemaConstants.ICFS_NAME, GROUP_CORSAIRS_NAME)
.assertNotDead() .assertIsExists() .attributes() .assertHasPrimaryIdentifier() .assertHasSecondaryIdentifier()
.assertKind(ShadowKindType.ACCOUNT) .assertTombstone() .attributes() .assertHasPrimaryIdentifier() .assertHasSecondaryIdentifier()
.assertKind(ShadowKindType.ACCOUNT) .assertTombstone() .attributes() .assertHasPrimaryIdentifier() .assertHasSecondaryIdentifier()
.display() .assertBasicRepoProperties() .attributes() .assertValue(ATTR_USERNAME_QNAME, ACCOUNT_WILL_USERNAME) .end()