[jboss-cvs] JBossAS SVN: r77520 - projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 27 04:15:48 EDT 2008
Author: alesj
Date: 2008-08-27 04:15:47 -0400 (Wed, 27 Aug 2008)
New Revision: 77520
Added:
projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSResourceTestCase.java
Modified:
projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSAllTestSuite.java
Log:
Group JBoss5 VFS + Spring resource lookup mock tests.
Modified: projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSAllTestSuite.java
===================================================================
--- projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSAllTestSuite.java 2008-08-27 07:15:27 UTC (rev 77519)
+++ projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSAllTestSuite.java 2008-08-27 08:15:47 UTC (rev 77520)
@@ -85,6 +85,7 @@
suite.addTest(VFSUtilTestCase.suite());
// custom
suite.addTest(CustomTestCase.suite());
+ suite.addTest(VFSResourceTestCase.suite());
return suite;
}
Copied: projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSResourceTestCase.java (from rev 77416, projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/PathQueryTestCase.java)
===================================================================
--- projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSResourceTestCase.java (rev 0)
+++ projects/vfs/trunk/src/test/java/org/jboss/test/virtual/test/VFSResourceTestCase.java 2008-08-27 08:15:47 UTC (rev 77520)
@@ -0,0 +1,56 @@
+/*
+* 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.virtual.test;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Test Spring VFSResource from JBoss5.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class VFSResourceTestCase extends AbstractVFSTest
+{
+ public VFSResourceTestCase(String s)
+ {
+ super(s);
+ }
+
+ public static Test suite()
+ {
+ return suite(VFSResourceTestCase.class);
+ }
+
+ public void testDirectoryFind() throws Throwable
+ {
+ URL url = getResource("/vfs/test/outer.jar");
+ String urlString = url.toExternalForm();
+ int p = urlString.indexOf(":");
+ URL rootURL = new URL("vfszip" + urlString.substring(p) + "/org/jboss/test/vfs");
+ VirtualFile root = VFS.getRoot(rootURL);
+ assertNotNull(root);
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list