1 16 package org.apache.cocoon.components.source.impl; 17 18 import org.apache.cocoon.core.container.ContainerTestCase; 19 import org.apache.excalibur.source.SourceResolver; 20 import org.apache.webdav.lib.WebdavResource; 21 22 25 public class WebDAVSourceTestCase extends ContainerTestCase { 26 27 private String m_scheme = "webdav"; 28 private String m_credentials = "usr:pwd"; 29 private String m_authority = "localhost:8888"; 30 private String m_path = "/webdav/"; 31 private String m_name = "files"; 32 private String m_location = m_scheme + "://" + m_credentials + "@" + m_authority + m_path + m_name; 33 private String m_secure = m_scheme + "://" + m_authority + m_path + m_name; 34 private String m_options = "?cocoon:webdav-action=" + WebdavResource.NOACTION + "&cocoon:webdav-depth=0"; 35 36 37 public void testResolve() throws Exception { 38 SourceResolver resolver = (SourceResolver) lookup(SourceResolver.ROLE); 39 String uri = m_location + m_options; 40 WebDAVSource source = (WebDAVSource) resolver.resolveURI(uri); 41 assertEquals(m_location, source.getURI()); 42 assertEquals(m_scheme, source.getScheme()); 43 assertEquals(m_name, source.getName()); 44 assertEquals(m_secure, source.getSecureURI()); 45 resolver.release(source); 46 } 47 48 public void testTraversal() throws Exception { 49 } 73 74 public void testModification() throws Exception { 75 } 104 105 public void testMakeCollection() throws Exception { 106 } 124 } 125 | Popular Tags |