Package smartrics.rest.client.RestData

Examples of smartrics.rest.client.RestData.Header


        // from the HTTP response or the data value in the expected cell
        // equals checks for r1 being a subset of r2
        Collection<Header> expected = (Collection<Header>) expectedObj;
        Collection<Header> actual = (Collection<Header>) actualObj;
        for (Header k : expected) {
            Header aHdr = find(actual, k);
            if (aHdr == null) {
                addError("not found: [" + k.getName() + " : " + k.getValue() + "]");
            }
        }
        return getErrors().size() == 0;
View Full Code Here


            String expStr = Tools.fromHtml(s.trim());
            String[] nvpArray = expStr.split("\n");
            for (String nvp : nvpArray) {
                try {
                    String[] nvpEl = nvp.split(":", 2);
                    expected.add(new Header(nvpEl[0].trim(), nvpEl[1].trim()));
                } catch (RuntimeException e) {
                    throw new IllegalArgumentException("Each entry in the must be separated by \\n and each entry must be expressed as a name:value");
                }
            }
        }
View Full Code Here

TOP

Related Classes of smartrics.rest.client.RestData.Header

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.