Examples of Propfind


Examples of org.apache.wink.webdav.model.Propfind

    public void testNonExistingEntry() throws Exception {

        // request
        String path = WebDAVCollectionResource.PATH + "/non-existing";
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        MockHttpServletRequest request = constructPropfindRequest(propfind, path, -1);
        MockHttpServletResponse response = invoke(request);

        // response
        Assert.assertEquals(HttpStatus.NOT_FOUND.getCode(), response.getStatus());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

        for (int i = 1; i <= WebDAVDocumentResource.ENTRY_NUMBER; i++) {

            // request
            String path = WebDAVCollectionResource.PATH + "/" + i;
            String name = "title" + i;
            Propfind propfind = new Propfind();
            propfind.setAllprop(new Allprop());
            Multistatus multistatus = propfind(propfind, path, -1);

            // responses - 1 response
            Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
            Assert.assertEquals(1, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

        // all entries
        for (int i = 1; i <= WebDAVDocumentResource.ENTRY_NUMBER; i++) {

            // request
            String path = WebDAVCollectionResource.PATH + "/" + i;
            Propfind propfind = new Propfind();
            QName propertyName = new QName("blah");
            Prop prop = new Prop();
            prop.setProperty(propertyName);
            propfind.setProp(prop);
            Multistatus multistatus = propfind(propfind, path, 0);

            // 1 response
            Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
            Assert.assertEquals(1, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, -1);

        // responses - depth is 1 so we have 1 + number of entries
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1 + WebDAVDocumentResource.ENTRY_NUMBER, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testAllProperties() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setAllprop(new Allprop());
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, -1);

        // responses - depth is 1 so we have 1 + number of entries
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1 + WebDAVDocumentResource.ENTRY_NUMBER, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testNonExistingProperty() throws Exception {

        // request with depth 0
        Propfind propfind = new Propfind();
        QName propertyName = new QName("blah");
        Prop prop = new Prop();
        prop.setProperty(propertyName);
        propfind.setProp(prop);
        Multistatus multistatus = propfind(propfind, WebDAVCollectionResource.PATH, 0);

        // 1 response
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testAllProperties() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setAllprop(new Allprop());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testNonExistingProperty() throws Exception {

        // request with depth 0
        Propfind propfind = new Propfind();
        QName propertyName = new QName("blah");
        Prop prop = new Prop();
        prop.setProperty(propertyName);
        propfind.setProp(prop);
        Multistatus multistatus = propfind(propfind, "/", 0);

        // 1 response - '/'
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(1, responses.size());
View Full Code Here

Examples of org.apache.wink.webdav.model.Propfind

    }

    public void testAllPropertyNames() throws Exception {

        // request
        Propfind propfind = new Propfind();
        propfind.setPropname(new Propname());
        Multistatus multistatus = propfind(propfind, "/", -1);

        // responses - depth is 1 so we have 2 ('/' and '/feed')
        Map<String, Response> responses = multistatus.getResponsesAsMapByHref();
        Assert.assertEquals(2, responses.size());
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.