|
|
b64180 |
From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001
|
|
|
b64180 |
From: Marian Koncek <mkoncek@redhat.com>
|
|
|
b64180 |
Date: Thu, 29 Aug 2019 13:58:24 +0200
|
|
|
b64180 |
Subject: [PATCH 2/4] Port to hamcrest 2.1
|
|
|
b64180 |
|
|
|
b64180 |
---
|
|
|
b64180 |
.../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 ---
|
|
|
b64180 |
.../main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java | 2 --
|
|
|
b64180 |
.../src/main/java/org/xmlunit/matchers/HasXPathMatcher.java | 2 --
|
|
|
b64180 |
.../src/main/java/org/xmlunit/matchers/TypeMatcher.java | 5 -----
|
|
|
b64180 |
.../main/java/org/xmlunit/matchers/ValidationMatcher.java | 3 ---
|
|
|
b64180 |
5 files changed, 15 deletions(-)
|
|
|
b64180 |
|
|
|
b64180 |
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
|
|
|
b64180 |
index 6452081..226399c 100644
|
|
|
b64180 |
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
|
|
|
b64180 |
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
|
|
|
b64180 |
@@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate;
|
|
|
b64180 |
|
|
|
b64180 |
import org.hamcrest.BaseMatcher;
|
|
|
b64180 |
import org.hamcrest.Description;
|
|
|
b64180 |
-import org.hamcrest.Factory;
|
|
|
b64180 |
import org.hamcrest.Matcher;
|
|
|
b64180 |
|
|
|
b64180 |
import java.lang.reflect.Constructor;
|
|
|
b64180 |
@@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
|
|
|
b64180 |
*
|
|
|
b64180 |
* As input all types are supported which are supported by {@link Input#from(Object)}.
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static CompareMatcher isIdenticalTo(final Object control) {
|
|
|
b64180 |
return new CompareMatcher(control).checkForIdentical();
|
|
|
b64180 |
}
|
|
|
b64180 |
@@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
|
|
|
b64180 |
*
|
|
|
b64180 |
* As input all types are supported which are supported by {@link Input#from(Object)}.
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static CompareMatcher isSimilarTo(final Object control) {
|
|
|
b64180 |
return new CompareMatcher(control).checkForSimilar();
|
|
|
b64180 |
}
|
|
|
b64180 |
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
|
|
|
b64180 |
index 6eb23e5..1e9b8b5 100644
|
|
|
b64180 |
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
|
|
|
b64180 |
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
|
|
|
b64180 |
@@ -16,7 +16,6 @@ package org.xmlunit.matchers;
|
|
|
b64180 |
|
|
|
b64180 |
import org.hamcrest.BaseMatcher;
|
|
|
b64180 |
import org.hamcrest.Description;
|
|
|
b64180 |
-import org.hamcrest.Factory;
|
|
|
b64180 |
import org.hamcrest.Matcher;
|
|
|
b64180 |
import org.w3c.dom.Node;
|
|
|
b64180 |
import org.xmlunit.builder.Input;
|
|
|
b64180 |
@@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher<Object> {
|
|
|
b64180 |
* @param valueMatcher matcher for the value at the specified xpath
|
|
|
b64180 |
* @return the xpath matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) {
|
|
|
b64180 |
return new EvaluateXPathMatcher(xPath, valueMatcher);
|
|
|
b64180 |
}
|
|
|
b64180 |
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
|
|
|
b64180 |
index 08325cd..6fbf0ac 100644
|
|
|
b64180 |
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
|
|
|
b64180 |
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
|
|
|
b64180 |
@@ -16,7 +16,6 @@ package org.xmlunit.matchers;
|
|
|
b64180 |
|
|
|
b64180 |
import org.hamcrest.BaseMatcher;
|
|
|
b64180 |
import org.hamcrest.Description;
|
|
|
b64180 |
-import org.hamcrest.Factory;
|
|
|
b64180 |
import org.hamcrest.Matcher;
|
|
|
b64180 |
import org.w3c.dom.Node;
|
|
|
b64180 |
import org.xmlunit.builder.Input;
|
|
|
b64180 |
@@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher<Object> {
|
|
|
b64180 |
* @param xPath the target xpath
|
|
|
b64180 |
* @return the xpath matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static HasXPathMatcher hasXPath(String xPath) {
|
|
|
b64180 |
return new HasXPathMatcher(xPath);
|
|
|
b64180 |
}
|
|
|
b64180 |
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
|
|
|
b64180 |
index b9002a1..7cd6843 100644
|
|
|
b64180 |
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
|
|
|
b64180 |
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
|
|
|
b64180 |
@@ -15,7 +15,6 @@
|
|
|
b64180 |
package org.xmlunit.matchers;
|
|
|
b64180 |
|
|
|
b64180 |
import org.hamcrest.Description;
|
|
|
b64180 |
-import org.hamcrest.Factory;
|
|
|
b64180 |
import org.hamcrest.Matcher;
|
|
|
b64180 |
import org.hamcrest.TypeSafeMatcher;
|
|
|
b64180 |
|
|
|
b64180 |
@@ -128,7 +127,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
|
|
|
b64180 |
* @param valueMatcher valueMatcher for the converted value
|
|
|
b64180 |
* @return the BigDecimal matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static TypeMatcher<BigDecimal> asBigDecimal(Matcher valueMatcher) {
|
|
|
b64180 |
return new BigDecimalTypeMatcher(valueMatcher);
|
|
|
b64180 |
}
|
|
|
b64180 |
@@ -146,7 +144,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
|
|
|
b64180 |
* @param valueMatcher valueMatcher for the converted value
|
|
|
b64180 |
* @return the Double matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static TypeMatcher<Double> asDouble(Matcher valueMatcher) {
|
|
|
b64180 |
return new DoubleTypeMatcher(valueMatcher);
|
|
|
b64180 |
}
|
|
|
b64180 |
@@ -164,7 +161,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
|
|
|
b64180 |
* @param valueMatcher valueMatcher for the converted value
|
|
|
b64180 |
* @return the Integer matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static TypeMatcher<Integer> asInt(Matcher valueMatcher) {
|
|
|
b64180 |
return new IntegerTypeMatcher(valueMatcher);
|
|
|
b64180 |
}
|
|
|
b64180 |
@@ -182,7 +178,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
|
|
|
b64180 |
* @param valueMatcher valueMatcher for the converted value
|
|
|
b64180 |
* @return the Boolean matcher
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static TypeMatcher<Boolean> asBoolean(Matcher valueMatcher) {
|
|
|
b64180 |
return new BooleanTypeMatcher(valueMatcher);
|
|
|
b64180 |
}
|
|
|
b64180 |
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
|
|
|
b64180 |
index 3126349..51f58ec 100644
|
|
|
b64180 |
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
|
|
|
b64180 |
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
|
|
|
b64180 |
@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem;
|
|
|
b64180 |
import org.xmlunit.validation.ValidationResult;
|
|
|
b64180 |
import org.hamcrest.BaseMatcher;
|
|
|
b64180 |
import org.hamcrest.Description;
|
|
|
b64180 |
-import org.hamcrest.Factory;
|
|
|
b64180 |
|
|
|
b64180 |
import javax.xml.transform.Source;
|
|
|
b64180 |
import javax.xml.validation.Schema;
|
|
|
b64180 |
@@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher {
|
|
|
b64180 |
}
|
|
|
b64180 |
}
|
|
|
b64180 |
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static ValidationMatcher valid(final Object schemaSource) {
|
|
|
b64180 |
return new ValidationMatcher(schemaSource);
|
|
|
b64180 |
}
|
|
|
b64180 |
@@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher {
|
|
|
b64180 |
/**
|
|
|
b64180 |
* @since XMLUnit 2.3.0
|
|
|
b64180 |
*/
|
|
|
b64180 |
- @Factory
|
|
|
b64180 |
public static ValidationMatcher valid(final Schema schema) {
|
|
|
b64180 |
return new ValidationMatcher(schema);
|
|
|
b64180 |
}
|
|
|
b64180 |
--
|
|
|
b64180 |
2.21.0
|
|
|
b64180 |
|