Files
json-path/json-path-hamcrest22.patch

91 lines
3.5 KiB
Diff

--- JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsCollectionWithSize.java 2022-06-10 05:36:45.715983000 +0200
+++ JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsCollectionWithSize.java 2022-06-10 05:38:46.875712672 +0200
@@ -30,7 +30,6 @@
package com.jayway.jsonassert.impl.matcher;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import java.util.Collection;
@@ -60,7 +59,6 @@
/**
* Does collection size satisfy a given matcher?
*/
- @Factory
public static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? super Integer> size) {
return new IsCollectionWithSize<E>(size);
}
@@ -71,7 +69,6 @@
* For example, assertThat(hasSize(equal_to(x)))
* vs. assertThat(hasSize(x))
*/
- @Factory
public static <E> Matcher<? super Collection<? extends E>> hasSize(int size) {
Matcher<? super Integer> matcher = equalTo(size);
return IsCollectionWithSize.<E>hasSize(matcher);
--- JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsEmptyCollection.java 2022-06-10 05:36:45.715983000 +0200
+++ JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsEmptyCollection.java 2022-06-10 05:38:06.103816690 +0200
@@ -30,7 +30,6 @@
package com.jayway.jsonassert.impl.matcher;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import java.util.Collection;
@@ -52,7 +51,6 @@
/**
* Matches an empty collection.
*/
- @Factory
public static <E> Matcher<Collection<E>> empty() {
return new IsEmptyCollection<E>();
}
--- JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsMapContainingKey.java 2022-06-10 05:36:45.715983000 +0200
+++ JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsMapContainingKey.java 2022-06-10 05:38:25.303767707 +0200
@@ -30,7 +30,6 @@
package com.jayway.jsonassert.impl.matcher;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import java.util.Map;
@@ -59,12 +58,10 @@
.appendDescriptionOf(keyMatcher);
}
- @Factory
public static <K> Matcher<Map<K,?>> hasKey(K key) {
return hasKey(equalTo(key));
}
- @Factory
public static <K> Matcher<Map<K,?>> hasKey(Matcher<K> keyMatcher) {
return new IsMapContainingKey<K>(keyMatcher);
}
--- JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsMapContainingValue.java 2022-06-10 05:36:45.715983000 +0200
+++ JsonPath-json-path-2.1.0/json-path-assert/src/main/java/com/jayway/jsonassert/impl/matcher/IsMapContainingValue.java 2022-06-10 05:39:07.895654981 +0200
@@ -30,7 +30,6 @@
package com.jayway.jsonassert.impl.matcher;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import java.util.Map;
@@ -59,12 +58,10 @@
.appendDescriptionOf(valueMatcher);
}
- @Factory
public static <V> Matcher<? super Map<?,V>> hasValue(V value) {
return IsMapContainingValue.<V>hasValue(equalTo(value));
}
- @Factory
public static <V> Matcher<? super Map<?,V>> hasValue(Matcher<? super V> valueMatcher) {
return new IsMapContainingValue<V>(valueMatcher);
}