T - the type parameter of the matcherpublic class JSONMatcher<T>
extends <any>
Matcher to assert that the serialization of an object matches the one stored in file.| Constructor and Description |
|---|
JSONMatcher(java.lang.String pathToExpected)
Will return true if the JSON serialization of the actual is equal to the trimmed serialization of the JSON
contained in the provided path
|
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description) |
boolean |
matches(java.lang.Object actual) |
public JSONMatcher(java.lang.String pathToExpected)
throws java.io.IOException
pathToExpected - path in the classpath to the file containing the expected JSON string, it can contain a beautified JSONjava.io.IOExceptionCopyright © 2018 SAP SE. All Rights Reserved.