Package org.xmlunit.assertj
Class AssertFactoryProvider
- java.lang.Object
-
- org.xmlunit.assertj.AssertFactoryProvider
-
class AssertFactoryProvider extends java.lang.Object
In AssertJ before 3.13.0AssertFactory
class looks like this:public interface AssertFactory
{ ASSERT createAssert(T t); } So after type erasure it should be like this:
public interface AssertFactory { Object createAssert(Object t); } In AssertJ 3.13.0 AssertFactory class was change to:
public interface AssertFactory<T, ASSERT extends Assert<?, ?>> { ASSERT createAssert(T t); }
So after type erasure it should be like this:
public interface AssertFactory { Assert createAssert(Object t); }
That change brings binary incompatibility so
NodeAssertFactory
cannot be used along with latest AssertJ. AssertFactoryProvider checks if there is new version of AssertFactory on class path and if so dynamically creates AssertFactory subclass otherwise return instance of NodeAssertFactory.AssertFactoryProvider uses ByteBuddy internally witch should be provided by latest AssertJ.
- Since:
- XMLUnit 2.6.4
- See Also:
AssertFactory
,FactoryBasedNavigableIterableAssert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
AssertFactoryProvider.NodeAssertFactoryDelegate
This class should has delegate method with signature matching to type erasure AssertFactory class from AssertJ 3.13.0 or higher which is `Assert createAssert(Object var1)`
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Class<? extends org.assertj.core.api.AssertFactory>
assertFactoryClass
-
Constructor Summary
Constructors Constructor Description AssertFactoryProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) org.assertj.core.api.AssertFactory<org.w3c.dom.Node,SingleNodeAssert>
create(JAXPXPathEngine engine)
private NodeAssertFactory
createDefaultInstance(JAXPXPathEngine engine)
private org.assertj.core.api.AssertFactory<org.w3c.dom.Node,SingleNodeAssert>
createProxyInstance(JAXPXPathEngine engine)
private boolean
hasAssertFactoryUpperBoundOnAssertType()
-
-
-
Method Detail
-
create
org.assertj.core.api.AssertFactory<org.w3c.dom.Node,SingleNodeAssert> create(JAXPXPathEngine engine)
-
hasAssertFactoryUpperBoundOnAssertType
private boolean hasAssertFactoryUpperBoundOnAssertType()
-
createProxyInstance
private org.assertj.core.api.AssertFactory<org.w3c.dom.Node,SingleNodeAssert> createProxyInstance(JAXPXPathEngine engine)
-
createDefaultInstance
private NodeAssertFactory createDefaultInstance(JAXPXPathEngine engine)
-
-