Examples of XMLPath


Examples of com.jayway.restassured.path.xml.XmlPath

    }

    @Test
    public void testGetAlertCountXml() throws Exception {

        XmlPath xmlPath =
        given()
            .header(acceptXml)
        .expect()
            .statusCode(200)
            .log().everything()
        .when()
            .get("/alert/count")
        .xmlPath();

        xmlPath.getInt("value.@value");
    }
View Full Code Here

Examples of com.jayway.restassured.path.xml.XmlPath

            .statusCode(201)
            .log().ifError()
        .when()
            .post("/resource/platforms");

        XmlPath xmlPath = response.xmlPath();
        Node resource1 = xmlPath.get("resource");
        Node platformIdNode =  resource1.get("resourceId");
        String platformId = platformIdNode.value();

        given().pathParam("id", platformId)
            .expect().statusCode(HttpStatus.SC_NO_CONTENT)
View Full Code Here

Examples of com.jayway.restassured.path.xml.XmlPath

        .when()
            .post("/resource/platforms");

        int platformId=0;
        try {
            XmlPath xmlPath = response.xmlPath();
            Node resource1 = xmlPath.get("resource");
            Node platformIdNode =  resource1.get("resourceId");
            platformId = Integer.parseInt(platformIdNode.value());

            // Now update the description
            resource.setDescription("li la lu");
View Full Code Here

Examples of com.jayway.restassured.path.xml.XmlPath

        .when()
            .post("/resource/platforms");

        int platformId=0;
        try {
            XmlPath xmlPath = response.xmlPath();
            Node resource1 = xmlPath.get("resource");
            Node platformIdNode =  resource1.get("resourceId");
            platformId = Integer.parseInt(platformIdNode.value());

            // Now update the description
            resource.setDescription("li la lu");
View Full Code Here

Examples of com.jayway.restassured.path.xml.XmlPath

            .statusCode(201)
            .log().ifError()
        .when()
            .post("/resource/platforms");

        XmlPath xmlPath = response.xmlPath();
        Node resource1 = xmlPath.get("resource");
        Node platformIdNode =  resource1.get("resourceId");
        String platformId = platformIdNode.value();

        try {
            long now = System.currentTimeMillis()-100;
View Full Code Here

Examples of com.jayway.restassured.path.xml.XmlPath

            .statusCode(200)
            .log().ifError()
        .when()
            .get("/reports");

        XmlPath xmlPath = response.xmlPath();
        assert xmlPath!=null;
        assert xmlPath.getNodeChildren("html.body.ul.li").size()== NUMBER_REPORTS;

    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.annotations.XmlPath

          property.setNillable(true);
        }
        processPropertyAnnotations(info, cls, javaHasAnnotations, property);

        if (helper.isAnnotationPresent(javaHasAnnotations, XmlPath.class)) {
            XmlPath xmlPath = (XmlPath) helper.getAnnotation(javaHasAnnotations, XmlPath.class);
            property.setXmlPath(xmlPath.value());
            Field tempField = new XMLField(xmlPath.value());
            boolean isAttribute = tempField.getLastXPathFragment().isAttribute();
            property.setIsAttribute(isAttribute);
            // set schema name
            String schemaName = XMLProcessor.getNameFromXPath(xmlPath.value(), property.getPropertyName(), isAttribute);
            QName qName;
            NamespaceInfo nsInfo = getPackageInfoForPackage(cls).getNamespaceInfo();
            if(isAttribute){
              if (nsInfo.isAttributeFormQualified()) {
                    qName = new QName(nsInfo.getNamespace(), schemaName);
View Full Code Here

Examples of org.eclipse.persistence.oxm.annotations.XmlPath

            choiceProp.setIsRequired(next.isRequired());
            // handle XmlPath - if xml-path is set, we ignore name/namespace
            if (paths != null && next.getXmlPath() == null) {
                // Only set the path, if the path hasn't already been set from
                // xml
                XmlPath nextPath = paths[i];
                next.setXmlPath(nextPath.value());
            }
            if (next.getXmlPath() != null) {
                choiceProp.setXmlPath(next.getXmlPath());
                boolean isAttribute = new XMLField(next.getXmlPath()).getLastXPathFragment().isAttribute();
                // validate attribute - must be in nested path, not at root
View Full Code Here

Examples of org.eclipse.persistence.oxm.annotations.XmlPath

          property.setNillable(true);
        }
        processPropertyAnnotations(info, cls, javaHasAnnotations, property);

        if (helper.isAnnotationPresent(javaHasAnnotations, XmlPath.class)) {
            XmlPath xmlPath = (XmlPath) helper.getAnnotation(javaHasAnnotations, XmlPath.class);
            property.setXmlPath(xmlPath.value());           
            boolean isAttribute = xmlPath.value().indexOf('@') > -1;
            property.setIsAttribute(isAttribute);
            // set schema name
            String schemaName = XMLProcessor.getNameFromXPath(xmlPath.value(), property.getPropertyName(), isAttribute);
            QName qName;
            NamespaceInfo nsInfo = getPackageInfoForPackage(cls).getNamespaceInfo();
            if(isAttribute){
              if (nsInfo.isAttributeFormQualified()) {
                    qName = new QName(nsInfo.getNamespace(), schemaName);
View Full Code Here

Examples of org.eclipse.persistence.oxm.annotations.XmlPath

            // handle XmlPath - if xml-path is set, we ignore name/namespace
            if (paths != null && next.getXmlPath() == null) {
                // Only set the path, if the path hasn't already been set from
                // xml
                XmlPath nextPath = paths[i];
                next.setXmlPath(nextPath.value());
            }
            if (next.getXmlPath() != null) {
                choiceProp.setXmlPath(next.getXmlPath());
                boolean isAttribute = new XMLField(next.getXmlPath()).getLastXPathFragment().isAttribute();
                // validate attribute - must be in nested path, not at root
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.