Package org.apache.wink.webdav.model

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


                    expectedPropnames.add(propertyNames[i]);
                }
            }
            totalCovered += expectedPropnames.size();

            Prop prop = propstat.getProp();
            Set<QName> propnames =
                WebDAVModelHelper.extractPropertyNames(prop, new HashSet<QName>());
            Assert.assertEquals(expectedPropnames.size(), propnames.size());

            for (QName name : expectedPropnames) {
View Full Code Here


    protected static void checkCollectionProperties(Response response, String name) {

        // check it contains all collection properties with OK status
        checkCollectionPropertyNames(response);

        Prop prop = response.getPropstat().get(0).getProp();

        // check name property
        Assert.assertEquals(name, prop.getDisplayname().getValue());

        // check the resource type property
        Assert.assertTrue(prop.getResourcetype().getCollection() != null);
    }
View Full Code Here

        // check it contains the root collection properties with OK status
        HttpStatus[] rootStatuses = {HttpStatus.OK, HttpStatus.OK, HttpStatus.NOT_FOUND};
        checkProperties(response, PROPERTIES_COLLECTION, rootStatuses);

        Prop prop = response.getPropstat().get(0).getProp();
        // check name property
        String displayName = "";
        if (prop.getDisplayname().getValue() != null) {
            displayName = prop.getDisplayname().getValue();
        }
        Assert.assertEquals(name, displayName);

        // check the resource type property
        Assert.assertTrue(prop.getResourcetype().getCollection() != null);
    }
View Full Code Here

    protected static void checkDocumentProperties(Response response, String name) {

        // check it contains all document properties with OK status
        checkDocumentPropertyNames(response);

        Prop prop = response.getPropstat().get(0).getProp();
        // check name property
        Assert.assertEquals(name, prop.getDisplayname().getValue());

        // check the resource type property
        Assert.assertFalse(prop.getResourcetype().getCollection() != null);
    }
View Full Code Here

        Assert.assertEquals(HttpStatus.OK.getCode(), response.getStatus());
        MediaType mediaType = MediaType.valueOf(response.getContentType());
        mediaType.getParameters().clear();
        Assert.assertEquals(MediaType.APPLICATION_XML_TYPE, mediaType);
        StringReader reader = new StringReader(response.getContentAsString());
        Prop prop =
            WebDAVModelHelper.unmarshal(WebDAVModelHelper.createUnmarshaller(),
                                        reader,
                                        Prop.class,
                                        "prop");
        List<Activelock> activelocks = prop.getLockdiscovery().getActivelock();
        Assert.assertNotNull(activelocks);
        Assert.assertEquals(1, activelocks.size());
        Assert.assertNotNull(activelocks.get(0).getLocktype().getWrite());
        Assert.assertNotNull(activelocks.get(0).getLockscope().getExclusive());
        Assert.assertEquals("0", activelocks.get(0).getDepth());
View Full Code Here

TOP

Related Classes of org.apache.wink.webdav.model.Prop

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.