Skip to content

Commit

Permalink
model-intest cleanup and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Oct 24, 2017
1 parent bbdff10 commit eb145af
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 25 deletions.
Expand Up @@ -275,6 +275,18 @@ public class AbstractConfiguredModelIntegrationTest extends AbstractModelIntegra
protected static final File ROLE_PERSONA_ADMIN_FILE = new File(COMMON_DIR, "role-persona-admin.xml");
protected static final String ROLE_PERSONA_ADMIN_OID = "16813ae6-2c0a-11e7-91fc-8333c244329e";

protected static final File ROLE_AUTOMATIC_FILE = new File(COMMON_DIR, "role-automatic.xml");
protected static final String ROLE_AUTOMATIC_OID = "8fdb56d8-e3f3-11e6-8be9-cb9862ab7c04";

protected static final File ROLE_AUTOCRATIC_FILE = new File(COMMON_DIR, "role-autocratic.xml");
protected static final String ROLE_AUTOCRATIC_OID = "4a678382-e3f4-11e6-8c3d-cfd3dba8168f";

protected static final File ROLE_AUTODIDACTIC_FILE = new File(COMMON_DIR, "role-autodidactic.xml");
protected static final String ROLE_AUTODIDACTIC_OID = "a4f941dc-e3f4-11e6-8eba-9fe432784017";

protected static final File ROLE_AUTOGRAPHIC_FILE = new File(COMMON_DIR, "role-autographic.xml");
protected static final String ROLE_AUTOGRAPHIC_OID = "be835a70-e3f4-11e6-82cb-9b47ebe57b11";

protected static final File USER_JACK_FILE = new File(COMMON_DIR, "user-jack.xml");
protected static final String USER_JACK_OID = "c0c010c0-d34d-b33f-f00d-111111111111";
protected static final String USER_JACK_USERNAME = "jack";
Expand Down
Expand Up @@ -86,18 +86,6 @@ public class TestUserTemplate extends AbstractInitializedModelIntegrationTest {
protected static final File ROLE_RASTAMAN_FILE = new File(TEST_DIR, "role-rastaman.xml");
protected static final String ROLE_RASTAMAN_OID = "81ac6b8c-225c-11e6-ab0f-87a169c85cca";

protected static final File ROLE_AUTOMATIC_FILE = new File(TEST_DIR, "role-automatic.xml");
protected static final String ROLE_AUTOMATIC_OID = "8fdb56d8-e3f3-11e6-8be9-cb9862ab7c04";

protected static final File ROLE_AUTOCRATIC_FILE = new File(TEST_DIR, "role-autocratic.xml");
protected static final String ROLE_AUTOCRATIC_OID = "4a678382-e3f4-11e6-8c3d-cfd3dba8168f";

protected static final File ROLE_AUTODIDACTIC_FILE = new File(TEST_DIR, "role-autodidactic.xml");
protected static final String ROLE_AUTODIDACTIC_OID = "a4f941dc-e3f4-11e6-8eba-9fe432784017";

protected static final File ROLE_AUTOGRAPHIC_FILE = new File(TEST_DIR, "role-autographic.xml");
protected static final String ROLE_AUTOGRAPHIC_OID = "be835a70-e3f4-11e6-82cb-9b47ebe57b11";

protected static final File USER_TEMPLATE_MAROONED_FILE = new File(TEST_DIR, "user-template-marooned.xml");
protected static final String USER_TEMPLATE_MAROONED_OID = "766215e8-5f1e-11e6-94bb-c3b21af53235";

Expand Down
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2010-2017 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.evolveum.midpoint.model.intest.mapping;

import java.io.File;

import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.context.ContextConfiguration;

import com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest;

/**
* @author semancik
*
*/
@ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"})
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
public class AbstractMappingTest extends AbstractInitializedModelIntegrationTest {

public static final File TEST_DIR = new File("src/test/resources/mapping");

}
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.evolveum.midpoint.model.intest;
package com.evolveum.midpoint.model.intest.mapping;

import static org.testng.AssertJUnit.assertNotNull;
import static com.evolveum.midpoint.test.IntegrationTestTools.display;
Expand All @@ -37,6 +37,7 @@
import com.evolveum.icf.dummy.resource.SchemaViolationException;
import com.evolveum.midpoint.model.api.ModelExecuteOptions;
import com.evolveum.midpoint.model.impl.trigger.RecomputeTriggerHandler;
import com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ChangeType;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
Expand Down Expand Up @@ -70,9 +71,7 @@
*/
@ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"})
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
public class TestMapping extends AbstractInitializedModelIntegrationTest {

public static final File TEST_DIR = new File("src/test/resources/mapping");
public class TestMapping extends AbstractMappingTest {

// CRIMSON resource has STRONG mappings, non-tolerant attributes, absolute-like mappings
protected static final File RESOURCE_DUMMY_CRIMSON_FILE = new File(TEST_DIR, "resource-dummy-crimson.xml");
Expand Down
Expand Up @@ -13,11 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.evolveum.midpoint.model.intest;
package com.evolveum.midpoint.model.intest.mapping;

import com.evolveum.icf.dummy.resource.DummyAccount;
import com.evolveum.icf.dummy.resource.DummyResource;
import com.evolveum.icf.dummy.resource.DummySyncStyle;
import com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
Expand Down Expand Up @@ -49,9 +50,7 @@
*/
@ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"})
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
public class TestMappingInbound extends AbstractInitializedModelIntegrationTest {

public static final File TEST_DIR = new File("src/test/resources/mapping-inbound");
public class TestMappingInbound extends AbstractMappingTest {

protected static final File RESOURCE_DUMMY_TEA_GREEN_FILE = new File(TEST_DIR, "resource-dummy-tea-green.xml");
protected static final String RESOURCE_DUMMY_TEA_GREEN_OID = "10000000-0000-0000-0000-00000000c404";
Expand Down
Expand Up @@ -37,8 +37,8 @@
import com.evolveum.midpoint.model.impl.trigger.RecomputeTriggerHandler;
import com.evolveum.midpoint.model.intest.AbstractInitializedModelIntegrationTest;
import com.evolveum.midpoint.model.intest.TestActivation;
import com.evolveum.midpoint.model.intest.TestMapping;
import com.evolveum.midpoint.model.intest.TestTriggerTask;
import com.evolveum.midpoint.model.intest.mapping.TestMapping;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.path.IdItemPathSegment;
Expand Down
Expand Up @@ -119,9 +119,9 @@
<name>getLocality</name>
<parameter>
<name>location</name>
<value>
<expression>
<path>locality</path>
</value>
</expression>
</parameter>
</function>
</expression>
Expand Down
4 changes: 2 additions & 2 deletions model/model-intest/testng-integration.xml
Expand Up @@ -38,8 +38,8 @@
<class name="com.evolveum.midpoint.model.intest.TestStrangeCases"/>
<class name="com.evolveum.midpoint.model.intest.TestMisc"/>
<class name="com.evolveum.midpoint.model.intest.TestResources"/>
<class name="com.evolveum.midpoint.model.intest.TestMapping"/>
<class name="com.evolveum.midpoint.model.intest.TestMappingInbound"/>
<class name="com.evolveum.midpoint.model.intest.mapping.TestMapping"/>
<class name="com.evolveum.midpoint.model.intest.mapping.TestMappingInbound"/>
<class name="com.evolveum.midpoint.model.intest.TestInbounds"/>
<class name="com.evolveum.midpoint.model.intest.TestVolatility"/>
<class name="com.evolveum.midpoint.model.intest.TestTriggerTask"/>
Expand Down

0 comments on commit eb145af

Please sign in to comment.