Revision: 1569
          http://svn.sourceforge.net/spring-rich-c/?rev=1569&view=rev
Author:   ge0ffrey
Date:     2006-11-18 03:21:02 -0800 (Sat, 18 Nov 2006)

Log Message:
-----------
All testcases should never fail they can alwasy specify -Dmaven.test.skip=true)

Modified Paths:
--------------
    trunk/spring-richclient/pom.xml

Added Paths:
-----------
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTestsIgnored.java

Removed Paths:
-------------
    
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTests.java

Modified: trunk/spring-richclient/pom.xml
===================================================================
--- trunk/spring-richclient/pom.xml     2006-11-18 11:13:51 UTC (rev 1568)
+++ trunk/spring-richclient/pom.xml     2006-11-18 11:21:02 UTC (rev 1569)
@@ -245,7 +245,7 @@
                     <artifactId>maven-surefire-plugin</artifactId>
                     <version>2.2</version>
                     <configuration>
-                        <testFailureIgnore>true</testFailureIgnore>
+                        <!--<testFailureIgnore>true</testFailureIgnore>-->
                         <forkMode>never</forkMode>
                         <includes>
                             <include>**/*Tests.java</include>

Deleted: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTests.java
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTests.java
        2006-11-18 11:13:51 UTC (rev 1568)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTests.java
        2006-11-18 11:21:02 UTC (rev 1569)
@@ -1,81 +0,0 @@
-/*
- * Copyright 2002-2004 the original author or authors.
- * 
- * Licensed 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.springframework.richclient.image;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * Tests the "image:" URL protocol handler.
- * 
- * @author oliverh
- */
-public class HandlerTests extends TestCase {
-
-    private static boolean imageHasNotBeenInstalledInThisJVM = true;
-
-    /**
-     * NOTE: This must be one big test method because of the static dependency
-     * introduced by the strange way Java requires custom URL handlers to be
-     * registered.
-     */
-    public void testHandler() throws MalformedURLException, IOException {
-        assertTrue("This test can only be run once in a single JVM", 
imageHasNotBeenInstalledInThisJVM);
-
-        URL url;
-
-//        // make sure a handler is not installed
-//        try {
-//            url = new URL("image:test");
-//            fail("image protocol is already installed. Do any of the other 
tests instantiate DefaultImageSource?");
-//        }
-//        catch (MalformedURLException e) {
-//            // expected
-//        }
-
-        // test install
-        ImageSource urlHandlerImageSource = (ImageSource) new 
ClassPathXmlApplicationContext(
-                
"org/springframework/richclient/image/application-context.xml").getBean("imageSource");
-        // Handler.installImageUrlHandler(urlHandlerImageSource); is not 
needed because imageSource calls it itself
-        try {
-            url = new URL("image:test");
-            imageHasNotBeenInstalledInThisJVM = false;
-        }
-        catch (MalformedURLException e) {
-            fail("protocol was not installed");
-        }
-
-        // test invalid key
-        url = new URL("image:image.that.does.not.exist");
-        try {
-            url.openConnection();
-            fail();
-        }
-        catch (NoSuchImageResourceException e) {
-            // expected
-        }
-
-        // test valid key
-        url = new URL("image:test.image.key");
-        url.openConnection();
-    }
-
-}
\ No newline at end of file

Copied: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTestsIgnored.java
 (from rev 1567, 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTests.java)
===================================================================
--- 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTestsIgnored.java
                         (rev 0)
+++ 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTestsIgnored.java
 2006-11-18 11:21:02 UTC (rev 1569)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2002-2004 the original author or authors.
+ * 
+ * Licensed 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.springframework.richclient.image;
+
+import junit.framework.TestCase;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Tests the "image:" URL protocol handler.
+ * 
+ * @author oliverh
+ */
+public class HandlerTestsIgnored extends TestCase {
+
+    private static boolean imageHasNotBeenInstalledInThisJVM = true;
+
+    /**
+     * NOTE: This must be one big test method because of the static dependency
+     * introduced by the strange way Java requires custom URL handlers to be
+     * registered.
+     */
+    public void testHandler() throws MalformedURLException, IOException {
+        assertTrue("This test can only be run once in a single JVM", 
imageHasNotBeenInstalledInThisJVM);
+
+        URL url;
+
+//        // make sure a handler is not installed
+//        try {
+//            url = new URL("image:test");
+//            fail("image protocol is already installed. Do any of the other 
tests instantiate DefaultImageSource?");
+//        }
+//        catch (MalformedURLException e) {
+//            // expected
+//        }
+
+        // test install
+        ImageSource urlHandlerImageSource = (ImageSource) new 
ClassPathXmlApplicationContext(
+                
"org/springframework/richclient/image/application-context.xml").getBean("imageSource");
+        // Handler.installImageUrlHandler(urlHandlerImageSource); is not 
needed because imageSource calls it itself
+        try {
+            url = new URL("image:test");
+            imageHasNotBeenInstalledInThisJVM = false;
+        }
+        catch (MalformedURLException e) {
+            fail("protocol was not installed");
+        }
+
+        // test invalid key
+        url = new URL("image:image.that.does.not.exist");
+        try {
+            url.openConnection();
+            fail();
+        }
+        catch (NoSuchImageResourceException e) {
+            // expected
+        }
+
+        // test valid key
+        url = new URL("image:test.image.key");
+        url.openConnection();
+    }
+
+}
\ No newline at end of file


Property changes on: 
trunk/spring-richclient/support/src/test/java/org/springframework/richclient/image/HandlerTestsIgnored.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to