[Jboss-cvs] JBossAS SVN: r56480 - in projects/microcontainer/trunk/container: . src src/resources src/resources/tests src/resources/tests/vfs src/resources/tests/vfs/sundry src/resources/tests/vfs/sundry/jar src/tests/org/jboss/test/vfs

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 31 11:15:43 EDT 2006


Author: adrian at jboss.org
Date: 2006-08-31 11:15:32 -0400 (Thu, 31 Aug 2006)
New Revision: 56480

Added:
   projects/microcontainer/trunk/container/src/resources/
   projects/microcontainer/trunk/container/src/resources/tests/
   projects/microcontainer/trunk/container/src/resources/tests/vfs/
   projects/microcontainer/trunk/container/src/resources/tests/vfs/sundry/
   projects/microcontainer/trunk/container/src/resources/tests/vfs/sundry/jar/
   projects/microcontainer/trunk/container/src/resources/tests/vfs/sundry/jar/archive.jar
   projects/microcontainer/trunk/container/src/tests/org/jboss/test/vfs/SundryVFSTests.java
Modified:
   projects/microcontainer/trunk/container/.classpath
   projects/microcontainer/trunk/container/build-test.xml
   projects/microcontainer/trunk/container/build-test14.xml
   projects/microcontainer/trunk/container/build.xml
Log:
Add some sundry vfs tests. That shows broken? behaviour.

Modified: projects/microcontainer/trunk/container/.classpath
===================================================================
--- projects/microcontainer/trunk/container/.classpath	2006-08-31 13:49:14 UTC (rev 56479)
+++ projects/microcontainer/trunk/container/.classpath	2006-08-31 15:15:32 UTC (rev 56480)
@@ -2,6 +2,7 @@
 <classpath>
 	<classpathentry kind="src" path="src/main"/>
 	<classpathentry output="output/eclipse-classes-tests" kind="src" path="src/tests"/>
+	<classpathentry kind="lib" path="src/resources/tests"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/common/lib/jboss-common.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>

Modified: projects/microcontainer/trunk/container/build-test.xml
===================================================================
--- projects/microcontainer/trunk/container/build-test.xml	2006-08-31 13:49:14 UTC (rev 56479)
+++ projects/microcontainer/trunk/container/build-test.xml	2006-08-31 15:15:32 UTC (rev 56480)
@@ -231,7 +231,7 @@
 
          <classpath>
             <pathelement location="${build.classes}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
             <path refid="javac.classpath"/>
             <path refid="apache.xerces.classpath"/>
          </classpath>
@@ -260,7 +260,7 @@
 
          <classpath>
             <pathelement location="${build.classes}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
             <path refid="no.javassist.classpath"/>
             <path refid="apache.xerces.classpath"/>
          </classpath>
@@ -296,7 +296,7 @@
 
          <classpath>
             <pathelement location="${build.classes}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
             <path refid="javac.classpath"/>
             <path refid="apache.xerces.classpath"/>
          </classpath>
@@ -318,7 +318,7 @@
 	      <junit printsummary="yes" fork="yes" haltonfailure="no">
          <classpath>
             <pathelement location="${build.classes}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
 	         <path refid="thirdparty.classpath"/>
             <path refid="javac.classpath"/>
             <path refid="apache.xerces.classpath"/>

Modified: projects/microcontainer/trunk/container/build-test14.xml
===================================================================
--- projects/microcontainer/trunk/container/build-test14.xml	2006-08-31 13:49:14 UTC (rev 56479)
+++ projects/microcontainer/trunk/container/build-test14.xml	2006-08-31 15:15:32 UTC (rev 56480)
@@ -270,7 +270,7 @@
 
          <classpath>
             <pathelement location="${build.classes.retro}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
             <path refid="tests.classpath"/>
             <path refid="apache.xerces.classpath"/>
          </classpath>
@@ -300,7 +300,7 @@
 	      <junit printsummary="yes" fork="yes" haltonfailure="no">
          <classpath>
             <pathelement location="${build.classes}"/>
-            <pathelement location="${build.resources}"/>
+            <pathelement location="${build.resources}/tests"/>
 	         <path refid="thirdparty.classpath"/>
             <path refid="javac.classpath"/>
             <path refid="apache.xerces.classpath"/>

Modified: projects/microcontainer/trunk/container/build.xml
===================================================================
--- projects/microcontainer/trunk/container/build.xml	2006-08-31 13:49:14 UTC (rev 56479)
+++ projects/microcontainer/trunk/container/build.xml	2006-08-31 15:15:32 UTC (rev 56480)
@@ -123,6 +123,7 @@
 	  description="Compile all source files."
 	  depends="_default:compile-classes,
               _default:compile-etc,
+              _default:compile-resources,
               retro"
   />
 

Added: projects/microcontainer/trunk/container/src/resources/tests/vfs/sundry/jar/archive.jar
===================================================================
(Binary files differ)


Property changes on: projects/microcontainer/trunk/container/src/resources/tests/vfs/sundry/jar/archive.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/microcontainer/trunk/container/src/tests/org/jboss/test/vfs/SundryVFSTests.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/vfs/SundryVFSTests.java	2006-08-31 13:49:14 UTC (rev 56479)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/vfs/SundryVFSTests.java	2006-08-31 15:15:32 UTC (rev 56480)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.vfs;
+
+import java.net.URL;
+
+import org.jboss.test.BaseTestCase;
+import org.jboss.vfs.VFSFactory;
+import org.jboss.vfs.VFSFactoryLocator;
+import org.jboss.vfs.spi.ReadOnlyVFS;
+import org.jboss.vfs.spi.VirtualFile;
+
+/**
+ * SundryVFSTests.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class SundryVFSTests extends BaseTestCase
+{
+   public SundryVFSTests(String name)
+   {
+      super(name);
+   }
+
+   protected VirtualFile getVirtualFile(String root, String path) throws Exception
+   {
+      URL url = getResource(root);
+      assertNotNull(url);
+      VFSFactoryLocator locator = new VFSFactoryLocator();
+      VFSFactory factory = locator.getFactory(url);
+      ReadOnlyVFS vfs = factory.getVFS(url);
+      return vfs.resolveFile(path);
+   }
+   
+   public void testBrokenContext() throws Exception
+   {
+      getVirtualFile("/vfs/sundry", "jar/archive.jar");
+   }
+   
+   public void testArchive() throws Exception
+   {
+      VirtualFile file = getVirtualFile("/vfs/sundry/", "jar/archive.jar");
+      assertTrue("Should be an archive", file.isArchive());
+   }
+}




More information about the jboss-cvs-commits mailing list