Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 812E2DAF3 for ; Tue, 23 Oct 2012 20:59:17 +0000 (UTC) Received: (qmail 89203 invoked by uid 500); 23 Oct 2012 20:59:16 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 89140 invoked by uid 500); 23 Oct 2012 20:59:16 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 89130 invoked by uid 99); 23 Oct 2012 20:59:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 20:59:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 20:59:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D3EDB23888E3 for ; Tue, 23 Oct 2012 20:58:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1401468 - /tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java Date: Tue, 23 Oct 2012 20:58:29 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121023205829.D3EDB23888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Oct 23 20:58:29 2012 New Revision: 1401468 URL: http://svn.apache.org/viewvc?rev=1401468&view=rev Log: Missed file Added: tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java (with props) Added: tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java?rev=1401468&view=auto ============================================================================== --- tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java (added) +++ tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java Tue Oct 23 20:58:29 2012 @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina.webresources; + +import java.io.File; + +import org.apache.catalina.WebResourceRoot; +import org.apache.catalina.WebResourceSet; + +public class TestFileResourceSet extends AbstractTestResourceSet { + + @Override + public WebResourceRoot getWebResourceRoot() { + File f = new File(getBaseDir()); + TesterWebResourceRoot root = new TesterWebResourceRoot(); + WebResourceSet webResourceSet = + new DirResourceSet(new TesterWebResourceRoot(), + f.getAbsolutePath(), "", ""); + root.setWebResourceSet(webResourceSet); + + WebResourceSet f1 = new FileResourceSet(root, + "test/webresources/dir1/f1.txt", "f1.txt", ""); + root.addPreResources(f1); + + WebResourceSet f2 = new FileResourceSet(root, + "test/webresources/dir1/f2.txt", "f2.txt", ""); + root.addPreResources(f2); + + WebResourceSet d1f1 = new FileResourceSet(root, + "test/webresources/dir1/d1/d1-f1.txt", "d1/d1-f1.txt", ""); + root.addPreResources(d1f1); + + WebResourceSet d2f1 = new FileResourceSet(root, + "test/webresources/dir1/d2/d2-f1.txt", "d2/d2-f1.txt", ""); + root.addPreResources(d2f1); + + return root; + } + + @Override + protected boolean isWriteable() { + return true; + } + + @Override + public String getBaseDir() { + return "test/webresources/dir2"; + } +} Propchange: tomcat/sandbox/trunk-resources/test/org/apache/catalina/webresources/TestFileResourceSet.java ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org