Skip to content

Commit

Permalink
removed obsolete test
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 17, 2024
1 parent 7d5af41 commit eca480e
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
import java.io.File;
import java.io.IOException;

import com.evolveum.midpoint.prism.CloneStrategy;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

import org.assertj.core.api.Assertions;
import org.testng.annotations.Test;

Expand All @@ -25,6 +22,7 @@
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;

public class TestMerger extends AbstractSchemaTest {

Expand Down Expand Up @@ -97,25 +95,6 @@ public void test130ValuePolicyMergeOperation() throws Exception {
testMergeOperation("value-policy/value-policy");
}

@Test
public void test140Archetype() throws Exception {
PrismObject<ArchetypeType> target = getPrismContext().parseObject(new File(TEST_ROOT_DIR, "archetype/archetype.xml"));
PrismObject<ArchetypeType> source= target.cloneComplex(CloneStrategy.REUSE);
PrismObject<ArchetypeType> result = target.clone();

SimpleObjectMergeOperation.merge(target, source);

LOGGER.trace("Merged object:\n{}", target.debugDump());
LOGGER.trace("Result object:\n{}", result.debugDump());

ObjectDelta<ArchetypeType> delta = target.diff(result);

Assertions.assertThat(target)
.matches(
t -> t.equivalent(result),
"Merged object is not equivalent to expected result\n" + delta.debugDump());
}

private <O extends ObjectType> void testMergeOperation(String fileNamePrefix) throws IOException, SchemaException, ConfigurationException {
PrismObject<O> source = getPrismContext().parseObject(new File(TEST_ROOT_DIR, fileNamePrefix + "-source.xml"));
PrismObject<O> target = getPrismContext().parseObject(new File(TEST_ROOT_DIR, fileNamePrefix + "-target.xml"));
Expand Down

0 comments on commit eca480e

Please sign in to comment.