Example usage for com.liferay.portal.kernel.webdav.methods Method OPTIONS

List of usage examples for com.liferay.portal.kernel.webdav.methods Method OPTIONS

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.webdav.methods Method OPTIONS.

Prototype

String OPTIONS

To view the source code for com.liferay.portal.kernel.webdav.methods Method OPTIONS.

Click Source Link

Usage

From source file:com.liferay.document.library.webdav.test.WebDAVLitmusBasicTest.java

License:Open Source License

@Test
public void test02Options() {
    Tuple tuple = service(Method.OPTIONS, StringPool.BLANK, null, null);

    assertCode(HttpServletResponse.SC_OK, tuple);

    Map<String, String> headers = getHeaders(tuple);

    String allowMethodNames = headers.get("Allow");

    for (String methodName : Method.SUPPORTED_METHOD_NAMES) {
        Assert.assertTrue("Does not allow " + methodName, allowMethodNames.contains(methodName));
    }/*www  . j  a  v  a  2  s.  c  om*/
}