Skip to content

Commit

Permalink
fix: testng
Browse files Browse the repository at this point in the history
  • Loading branch information
benfonty committed Feb 20, 2024
1 parent aaec790 commit 4cbc598
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public void testDiffSingularAttribute() throws Exception
op.apply(source);
}
removeNullNodes(target);
assertEquals(source, target);
// Force testng to use object equals instead of iterator one, because the attributes are not in the same order
assertEquals((Object) source, (Object) target);
}

/**
Expand Down Expand Up @@ -324,7 +325,8 @@ public void testDiffMultiValuedAttribute() throws Exception
" not in target photo array " + targetPhotos);
}
}
assertEquals(source, target);
// Force testng to use object equals instead of iterator one, because the attributes are not in the same order
assertEquals((Object) source, (Object) target);
}

/**
Expand Down Expand Up @@ -496,7 +498,8 @@ public void testDiffMultiValuedComplexAttribute() throws Exception
op.apply(source);
}
removeNullNodes(target);
assertEquals(source, target);
// Force testng to use object equals instead of iterator one, because the attributes are not in the same order
assertEquals((Object) source, (Object) target);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ public void testAddReplaceRoot() throws IOException, ScimException

JsonUtils.addValue(Path.root(), resource, value);

assertEquals(resource, expectedAddResult);
// Force testng to use object equals instead of iterator one, because the attributes are not in the same order
assertEquals((Object) resource, (Object) expectedAddResult);

JsonNode expectedReplaceResult = JsonUtils.getObjectReader().
readTree("{\n" +
Expand Down Expand Up @@ -832,7 +833,8 @@ public void testAddReplaceRoot() throws IOException, ScimException

JsonUtils.replaceValue(Path.root(), resource, value);

assertEquals(resource, expectedReplaceResult);
// Force testng to use object equals instead of iterator one, because the attributes are not in the same order
assertEquals((Object) resource, (Object) expectedReplaceResult);
}


Expand Down

0 comments on commit 4cbc598

Please sign in to comment.