Class JsonAssertion<M>
- java.lang.Object
-
- org.apache.commons.lang3.tuple.Pair<L,R>
-
- org.apache.commons.lang3.tuple.MutablePair<E,org.hamcrest.Matcher<M>>
-
- dev.aherscu.qa.testing.utils.assertions.Assertion<String,M>
-
- dev.aherscu.qa.testing.utils.assertions.JsonAssertion<M>
-
- Type Parameters:
M
- type of data to match
- All Implemented Interfaces:
Serializable
,Comparable<org.apache.commons.lang3.tuple.Pair<String,org.hamcrest.Matcher<M>>>
,Map.Entry<String,org.hamcrest.Matcher<M>>
public class JsonAssertion<M> extends Assertion<String,M>
Represents a JSON assertion as a JSON path paired with a Hamcrest matcher.NOTE: not designed for serialization
- Author:
- aherscu
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JsonAssertion(String jsonPath)
Constructs a JSON assertion without a matcher.JsonAssertion(String jsonPath, org.hamcrest.Matcher<M> matcher)
Constructs a JSON assertion with specified matcher.
-
Method Summary
-
Methods inherited from class org.apache.commons.lang3.tuple.MutablePair
emptyArray, getLeft, getRight, of, of, ofNonNull, setLeft, setRight, setValue
-
-
-
-
Constructor Detail
-
JsonAssertion
public JsonAssertion(String jsonPath)
Constructs a JSON assertion without a matcher. Use to assert path existence only.- Parameters:
jsonPath
- the JSON path
-
-