migrate away from legacy xmlunit API

Description

This project's tests depend on the xmlunit-legacy API. It should be migrated to use the xmlunit-core/xmlunit-matchers APIs instead.

Environment

None

Activity

Scott CantorApril 2, 2020 at 4:46 PM

I sanitized both projects, I think all uses of the class are gone. I'll remove it and remove the dependency on the legacy jar and resolve once we have nightlies passing.

Scott CantorApril 2, 2020 at 2:41 PM

Never mind, Eclipse's search is being weird, I see the references now. I'll go ahead and at least deprecate the class.

Scott CantorApril 2, 2020 at 2:39 PM


I'm not seeing any references across the V4 stack to the XMLAssertTestNG class. I don't think any of these issues up the stack were ever resolved, but maybe the dependency on this class was?

If so, we should obviously just go ahead and remove it (and it's not API since it's a test class, so we can just yank it immediately).

Rod WiddowsonJuly 3, 2018 at 10:01 AM

is this something we actually want to completely forget about until IdP 4.0.  Might it be too disruptive to do it in the 3.4 timescale?

Ian YoungMarch 13, 2018 at 3:46 PM

There's only one test class referencing the legacy API in this project, XMLAssertTestNG. This is not a test, but a test utility class described as follows:

This class is functionally identical to, and copied from, {@link org.custommonkey.xmlunit.XMLAssert}. Rather than inheriting from and using JUnit's Assert class, it instead uses TestNG's {@link org.testng.Assert}.

It has an interesting non-Apache license at the top because of this; I assume this is not an issue because it's for internal use and not shipped as part of any product.

It's used by just two tests in java-identity-provider and about a dozen in java-opensaml.

The XMLAssert class is no longer part of the XMLUnit API with version 2, and the meaning of the Diff objects passed through to the methods in this class have changed enough that the V2 ones aren't a drop-in replacement for the V1 ones.

It seems, therefore, as if the easiest way to resolve this will be to:

 

Fixed

Details

Assignee

Reporter

Components

Fix versions

Created March 9, 2018 at 5:44 PM
Updated March 22, 2021 at 9:47 PM
Resolved April 3, 2020 at 3:52 PM

Flag notifications