Skip to content

Commit

Permalink
Adapt TestNullAttribute to "test resource" changes
Browse files Browse the repository at this point in the history
Now we validate the schema after being fetched from the resource,
so a missing attribute had to be introduced there.

Related to recent refactorings for test operation. Should
fix story tests.
  • Loading branch information
mederly committed May 21, 2022
1 parent 09b831e commit 649909c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import com.evolveum.midpoint.util.DOMUtil;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

import static com.evolveum.midpoint.test.DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME;

@ContextConfiguration(locations = { "classpath:ctx-story-test-main.xml" })
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
public class TestNullAttribute extends AbstractStoryTest {
Expand Down Expand Up @@ -78,6 +80,7 @@ public void initSystem(Task initTask, OperationResult initResult) throws Excepti
dummyResourceCtl.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME, String.class, false, false);
dummyResourceCtl.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_SHIP, String.class, false, false);
dummyResourceCtl.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_WEAPON, String.class, false, false);
dummyResourceCtl.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME, String.class, false, true);

dummyResource = dummyResourceCtl.getDummyResource();
resourceDummy = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_FILE,
Expand Down

0 comments on commit 649909c

Please sign in to comment.