Skip to content

Commit

Permalink
Fixing the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Jun 14, 2016
1 parent e779870 commit a8f20a7
Showing 1 changed file with 11 additions and 7 deletions.
Expand Up @@ -25,6 +25,9 @@
import javax.xml.bind.JAXBException;

import com.evolveum.midpoint.model.api.ModelExecuteOptions;
import com.evolveum.midpoint.prism.util.PrismAsserts;
import com.evolveum.midpoint.test.IntegrationTestTools;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
Expand Down Expand Up @@ -52,11 +55,6 @@
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SecurityViolationException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentPolicyEnforcementType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType;

import static org.testng.AssertJUnit.*;

Expand Down Expand Up @@ -419,8 +417,10 @@ public void test220DeleteUserMorgan() throws Exception {
OperationResult result = task.getResult();
assumeAssignmentPolicy(AssignmentPolicyEnforcementType.FULL);

assertDummyAccount(null, "morgan");

// WHEN
modelCrudService.deleteObject(UserType.class, USER_MORGAN_OID, ModelExecuteOptions.createReconcile(), task, result);
modelCrudService.deleteObject(FocusType.class, USER_MORGAN_OID, null, task, result);

// THEN
try {
Expand All @@ -430,6 +430,10 @@ public void test220DeleteUserMorgan() throws Exception {
// ok
}

assertNoDummyAccountById(null, "morgan");
assertNoDummyAccount(null, "morgan");

result.computeStatus();
IntegrationTestTools.display(result);
TestUtil.assertSuccess(result);
}
}

0 comments on commit a8f20a7

Please sign in to comment.