com.jayway.jsonassert
Class JsonAssert
java.lang.Object
com.jayway.jsonassert.JsonAssert
public class JsonAssert
- extends Object
User: kalle stenflo
Date: 1/24/11
Time: 9:31 PM
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRICT_MODE
public static final int STRICT_MODE
- See Also:
- Constant Field Values
SLACK_MODE
public static final int SLACK_MODE
- See Also:
- Constant Field Values
JsonAssert
public JsonAssert()
setMode
public static void setMode(int mode)
getMode
public static int getMode()
with
public static JsonAsserter with(String json)
throws ParseException
- Creates a JSONAsserter
- Parameters:
json - the JSON document to create a JSONAsserter for
- Returns:
- a JSON asserter initialized with the provided document
- Throws:
ParseException - when the given JSON could not be parsed
with
public static JsonAsserter with(Reader reader)
throws ParseException,
IOException
- Creates a JSONAsserter
- Parameters:
reader - the reader of the json document
- Returns:
- a JSON asserter initialized with the provided document
- Throws:
ParseException - when the given JSON could not be parsed
IOException
with
public static JsonAsserter with(InputStream is)
throws ParseException,
IOException
- Creates a JSONAsserter
- Parameters:
is - the input stream
- Returns:
- a JSON asserter initialized with the provided document
- Throws:
ParseException - when the given JSON could not be parsed
IOException
collectionWithSize
public static CollectionMatcher collectionWithSize(org.hamcrest.Matcher<? super Integer> sizeMatcher)
mapContainingKey
public static org.hamcrest.Matcher<Map<String,?>> mapContainingKey(org.hamcrest.Matcher<String> keyMatcher)
mapContainingValue
public static <V> org.hamcrest.Matcher<? super Map<?,V>> mapContainingValue(org.hamcrest.Matcher<? super V> valueMatcher)
emptyCollection
public static org.hamcrest.Matcher<Collection<Object>> emptyCollection()
Copyright © 2011. All Rights Reserved.