Package net.javacrumbs.jsonunit.core.internal

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


        // Check host license properties to see if specified feature is supported by the license.
        for (KeyAnyValue prop : props) {
            String key = prop.getKey();
            if (key.equalsIgnoreCase(LICENSE_INFO_FEATURE)) {
                KeyValue propValue = (KeyValue)prop.getValue();
                if (propValue.getKey().equalsIgnoreCase(featureKey)) {
                    featureSupported = true;
                    break;
                }
            }
        }
View Full Code Here


        // Check host license properties to see if specified feature is supported by the license.
        for (KeyAnyValue prop : props) {
            String key = prop.getKey();
            if (key.equalsIgnoreCase(LICENSE_INFO_FEATURE)) {
                KeyValue propValue = (KeyValue)prop.getValue();
                if (propValue.getKey().equalsIgnoreCase(featureKey)) {
                    featureSupported = true;
                    break;
                }
            }
        }
View Full Code Here

     * 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

        Map.Entry entry = new DefaultMapEntry(key, value);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 2. test pair constructor
        KeyValue pair = new DefaultKeyValue(key, value);
        assertSame(key, pair.getKey());
        assertSame(value, pair.getValue());

        // 3. test copy constructor
        Map.Entry entry2 = new DefaultMapEntry(entry);
        assertSame(key, entry2.getKey());
        assertSame(value, entry2.getValue());
View Full Code Here

        Map.Entry entry = new UnmodifiableMapEntry(key, value);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 2. test pair constructor
        KeyValue pair = new DefaultKeyValue(key, value);
        entry = new UnmodifiableMapEntry(pair);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 3. test copy constructor
View Full Code Here

TOP

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

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.