Package net.javacrumbs.jsonunit.core.internal

Examples of net.javacrumbs.jsonunit.core.internal.Node


     * Fails if the selected JSON is not a String or is not present or the value
     * is not equal to expected value.
     */
    public void isStringEqualTo(String expected) {
        isString();
        Node node = getNode(actual, path);
        if (!node.asText().equals(expected)) {
            failWithMessage("Node \"" + path + "\" is not equal to \"" + expected + "\".");
        }
    }
View Full Code Here


     *
     * @return
     */
    public ArrayAssert isArray() {
        isPresent();
        Node node = getNode(actual, path);
        if (node.getNodeType() != ARRAY) {
            failOnType(node, "an array");
        }
        return new ArrayAssert(node.arrayElements());
    }
View Full Code Here

    /**
     * Fails if the selected JSON is not a String or is not present.
     */
    public void isString() {
        isPresent();
        Node node = getNode(actual, path);
        if (node.getNodeType() != STRING) {
            failOnType(node, "a string");
        }
    }
View Full Code Here

TOP

Related Classes of net.javacrumbs.jsonunit.core.internal.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.