1 16 package org.apache.cocoon; 17 18 23 public class WebdavDavmapTestCase 24 extends HtmlUnitTestCase 25 { 26 static final String pageurl = "/samples/blocks/webdav/davmap/"; 27 static final String davmapTitle = "repo"; 28 29 static final String contentB = 30 "<page>\n"+ 31 "<title>Page 2</title>\n"+ 32 "<content>\n"+ 33 " <para>Paragraph 1</para>\n"+ 34 " <para>Paragraph 2</para>\n"+ 35 "</content>\n"+ 36 "</page>\n"; 37 38 public void testDavmapTitle() 39 throws Exception 40 { 41 loadHtmlPage(pageurl+"repo/"); 42 assertXPath("/html/head/title", davmapTitle); 43 } 44 45 public void testPutReadDelete() 46 throws Exception 47 { 48 loadPutResponse(pageurl+"repo/contentB.xml", contentB); 49 assertEquals("Status code", 201, response.getStatusCode()); 50 51 loadXmlPage(pageurl+"repo/contentB.xml"); 52 assertXPath("/page/title", "Page 2"); 53 54 loadDeleteResponse(pageurl+"repo/contentB.xml"); 55 assertEquals("Status code", 200, response.getStatusCode()); 56 } 57 } 58 | Popular Tags |