Skip to content

Commit

Permalink
Fixing path-related tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Jul 16, 2014
1 parent a89d117 commit b7ea65c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -29,6 +29,7 @@
import com.evolveum.midpoint.prism.path.IdItemPathSegment;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.prism.path.NameItemPathSegment;
import com.evolveum.midpoint.prism.util.PrismAsserts;
import com.evolveum.midpoint.prism.util.PrismTestUtil;
import com.evolveum.midpoint.prism.xnode.MapXNode;
import com.evolveum.midpoint.prism.xnode.PrimitiveXNode;
Expand Down Expand Up @@ -314,7 +315,7 @@ public void testObjectDeltaRoundtrip() throws Exception {
ItemPathType itemPathType = mod1.getPath();
assertNotNull("Wrong path (must not be null)", itemPathType);
// assertTrue("Wrong path: "+itemPathType, itemPathType.getItemPath().isEmpty());
assertEquals("Wrong path", itemPathType.getItemPath(), new ItemPath(UserType.F_COST_CENTER));
PrismAsserts.assertPathEquivalent("Wrong path", itemPathType.getItemPath(), new ItemPath(UserType.F_COST_CENTER));
List<RawType> valueElements = mod1.getValue();
assertEquals("Wrong number of value elements", 1, valueElements.size());
RawType rawValue = valueElements.get(0);
Expand Down
Expand Up @@ -20,6 +20,7 @@

import com.evolveum.midpoint.prism.PrismContext;

import com.evolveum.midpoint.prism.util.PrismAsserts;
import org.testng.annotations.Test;
import org.testng.AssertJUnit;

Expand Down Expand Up @@ -169,8 +170,7 @@ public void testResolvePathPolyStringOdoOrig() throws Exception {
assertEquals("Wrong resolved idi new value", PrismTestUtil.createPolyString("Captain Jack Sparrow"),
((PrismProperty<PolyString>)idi.getItemNew()).getRealValue());

assertEquals("Wrong residual path", new ItemPath(PolyString.F_ORIG), idi.getResidualPath());

PrismAsserts.assertPathEquivalent("Wrong residual path", new ItemPath(PolyString.F_ORIG), idi.getResidualPath());
}

@Test
Expand All @@ -188,8 +188,8 @@ public void testResolvePathPolyStringOdoNorm() throws Exception {
((PrismProperty<PolyString>)idi.getItemOld()).getRealValue());
assertEquals("Wrong resolved idi new value", PrismTestUtil.createPolyString("Captain Jack Sparrow"),
((PrismProperty<PolyString>)idi.getItemNew()).getRealValue());
assertEquals("Wrong residual path", new ItemPath(PolyString.F_NORM), idi.getResidualPath());

PrismAsserts.assertPathEquivalent("Wrong residual path", new ItemPath(PolyString.F_NORM), idi.getResidualPath());

}

Expand Down

0 comments on commit b7ea65c

Please sign in to comment.