[jboss-svn-commits] JBoss Common SVN: r4913 - in common-core/trunk: src/test/java/org/jboss/test and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Mar 6 20:15:08 EST 2012
Author: bmaxwell
Date: 2012-03-06 20:15:08 -0500 (Tue, 06 Mar 2012)
New Revision: 4913
Added:
common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/
common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java
Removed:
common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java
Modified:
common-core/trunk/pom.xml
Log:
[JBPAPP-8065] adding testcase
Modified: common-core/trunk/pom.xml
===================================================================
--- common-core/trunk/pom.xml 2012-03-07 01:12:01 UTC (rev 4912)
+++ common-core/trunk/pom.xml 2012-03-07 01:15:08 UTC (rev 4913)
@@ -61,6 +61,7 @@
<includes>
<include>**/*TestCase.java</include>
</includes>
+ <forkMode>always</forkMode>
</configuration>
</plugin>
<plugin>
@@ -135,4 +136,4 @@
</dependencies>
-</project>
\ No newline at end of file
+</project>
Deleted: common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java
===================================================================
--- common-core/branches/2.2.18.GA_JBPAPP-8068/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java 2012-03-07 01:12:01 UTC (rev 4912)
+++ common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java 2012-03-07 01:15:08 UTC (rev 4913)
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jbpapp8065;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Date;
-
-import org.jboss.net.protocol.file.FileURLConnection;
-
-import junit.framework.TestCase;
-
-/**
- * Unit tests for JBPAPP-8065
- *
- * @see https://issues.jboss.org/browse/JBPAPP-8065
- *
- * @author bmaxwell
- */
-public class JBPAPP8065UnitTestCase extends TestCase
-{
- public JBPAPP8065UnitTestCase(String name)
- {
- super(name);
- }
-
- public void testJBPAPP806_UseURI_False()
- {
- System.setProperty("org.jboss.net.protocol.file.useURI", "false");
- URL url = null;
- try
- {
- url = new URL("file:non-exisitant-file-" + new Date().getTime());
- try
- {
- URLConnection urlConnection = new FileURLConnection(url);
- urlConnection.connect();
- }
- catch (IOException e)
- {
- // this will catch a FileNotFoundException
- // This is the expected result when -Dorg.jboss.net.protocol.file.useURI=false
- return;
- }
- catch(IllegalArgumentException iae)
- {
- iae.printStackTrace();
- fail("URL: " + url + " should have thrown a FileNotFoundException when -Dorg.jboss.net.protocol.file.useURI=false see JBPAPP-8065");
- }
- fail("URL: " + url + " should have thrown a FileNotFoundException when -Dorg.jboss.net.protocol.file.useURI=false see JBPAPP-8065");
- }
- catch (MalformedURLException e)
- {
- e.printStackTrace();
- fail("URL: " + url + " should not be malformed");
- }
- }
-
-// This is commented out because the system property is set in a static block in FileURLConnection and we maven makes it hard to run the tests in separate jvm
-// The testJBPAPP806_UseURI_False will ensure the old functionailty works org.jboss.net.protocol.file.useURI
-// public void testJBPAPP806_UseURI_True()
-// {
-// System.setProperty("org.jboss.net.protocol.file.useURI", "true");
-// URL url = null;
-// try
-// {
-// url = new URL("file:non-exisitant-file-" + new Date().getTime());
-// try
-// {
-// URLConnection urlConnection = new FileURLConnection(url);
-// urlConnection.connect();
-// }
-// catch (IOException e)
-// {
-// // this will catch a FileNotFoundException
-// // This is NOT the expected result when -Dorg.jboss.net.protocol.file.useURI=true
-// fail("URL: " + url + " should have thrown an IllegalArgumentException when -Dorg.jboss.net.protocol.file.useURI=true see JBPAPP-8065");
-// }
-// catch(IllegalArgumentException iae)
-// {
-// // This is the expected results the url.toURI() will throw given file:non... is not a valid URI
-// return;
-// }
-// fail("URL: " + url + " should have thrown an IllegalArgumentException when -Dorg.jboss.net.protocol.file.useURI=true see JBPAPP-8065");
-// }
-// catch (MalformedURLException e)
-// {
-// e.printStackTrace();
-// fail("URL: " + url + " should not be malformed");
-// }
-// }
-}
Copied: common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java (from rev 4912, common-core/branches/2.2.18.GA_JBPAPP-8068/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java)
===================================================================
--- common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java (rev 0)
+++ common-core/trunk/src/test/java/org/jboss/test/jbpapp8065/JBPAPP8065UnitTestCase.java 2012-03-07 01:15:08 UTC (rev 4913)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp8065;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Date;
+
+import org.jboss.net.protocol.file.FileURLConnection;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests for JBPAPP-8065
+ *
+ * @see https://issues.jboss.org/browse/JBPAPP-8065
+ *
+ * @author bmaxwell
+ */
+public class JBPAPP8065UnitTestCase extends TestCase
+{
+ public JBPAPP8065UnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testJBPAPP806_UseURI_False()
+ {
+ System.setProperty("org.jboss.net.protocol.file.useURI", "false");
+ URL url = null;
+ try
+ {
+ url = new URL("file:non-exisitant-file-" + new Date().getTime());
+ try
+ {
+ URLConnection urlConnection = new FileURLConnection(url);
+ urlConnection.connect();
+ }
+ catch (IOException e)
+ {
+ // this will catch a FileNotFoundException
+ // This is the expected result when -Dorg.jboss.net.protocol.file.useURI=false
+ return;
+ }
+ catch(IllegalArgumentException iae)
+ {
+ iae.printStackTrace();
+ fail("URL: " + url + " should have thrown a FileNotFoundException when -Dorg.jboss.net.protocol.file.useURI=false see JBPAPP-8065");
+ }
+ fail("URL: " + url + " should have thrown a FileNotFoundException when -Dorg.jboss.net.protocol.file.useURI=false see JBPAPP-8065");
+ }
+ catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ fail("URL: " + url + " should not be malformed");
+ }
+ }
+
+// This is commented out because the system property is set in a static block in FileURLConnection and we maven makes it hard to run the tests in separate jvm
+// The testJBPAPP806_UseURI_False will ensure the old functionailty works org.jboss.net.protocol.file.useURI
+// public void testJBPAPP806_UseURI_True()
+// {
+// System.setProperty("org.jboss.net.protocol.file.useURI", "true");
+// URL url = null;
+// try
+// {
+// url = new URL("file:non-exisitant-file-" + new Date().getTime());
+// try
+// {
+// URLConnection urlConnection = new FileURLConnection(url);
+// urlConnection.connect();
+// }
+// catch (IOException e)
+// {
+// // this will catch a FileNotFoundException
+// // This is NOT the expected result when -Dorg.jboss.net.protocol.file.useURI=true
+// fail("URL: " + url + " should have thrown an IllegalArgumentException when -Dorg.jboss.net.protocol.file.useURI=true see JBPAPP-8065");
+// }
+// catch(IllegalArgumentException iae)
+// {
+// // This is the expected results the url.toURI() will throw given file:non... is not a valid URI
+// return;
+// }
+// fail("URL: " + url + " should have thrown an IllegalArgumentException when -Dorg.jboss.net.protocol.file.useURI=true see JBPAPP-8065");
+// }
+// catch (MalformedURLException e)
+// {
+// e.printStackTrace();
+// fail("URL: " + url + " should not be malformed");
+// }
+// }
+}
More information about the jboss-svn-commits
mailing list