[embjopr-commits] EMBJOPR SVN: r632 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5/app/ear and 1 other directories.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Wed Jul 29 19:37:54 EDT 2009


Author: ozizka at redhat.com
Date: 2009-07-29 19:37:53 -0400 (Wed, 29 Jul 2009)
New Revision: 632

Modified:
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java
Log:
 * EarTest updated.

Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java	2009-07-29 22:41:58 UTC (rev 631)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java	2009-07-29 23:37:53 UTC (rev 632)
@@ -26,6 +26,7 @@
 import com.gargoylesoftware.htmlunit.html.*;
 import java.io.IOException;
 import java.util.*;
+import java.util.logging.Level;
 import org.jboss.logging.*;
 import org.apache.cactus.ServletTestCase;
 import org.jboss.jsfunit.framework.WebClientSpec;
@@ -582,6 +583,14 @@
 
         assertTrue("Expected message: " + expectedServerMsg + " Actual: "+ message.getDetail(),
                    message.getDetail().contains(expectedServerMsg));
+				if( ! message.getDetail().contains(expectedServerMsg) ){
+					//throw new EmbJoprTestException( "Expected message: " + expectedServerMsg + " Actual: "+ message.getDetail(), this);
+					String fileName = this.getName() + "-msgCheck.html";
+					try {
+						ejtt.dumpPage( fileName );
+					} catch (IOException ex) { log.error(ex.toString()); }
+					fail( "\nExpected message: [" + expectedServerMsg + "]\nActual: ["+ message.getDetail() + "]\nPage dumped to '"+fileName+"'." );
+				}
 
 				assertEquals("Incorrect message severity. Message: "+message.getSummary(), expectedSeverity, message.getSeverity());
 

Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java	2009-07-29 22:41:58 UTC (rev 631)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java	2009-07-29 23:37:53 UTC (rev 632)
@@ -219,7 +219,8 @@
 			String rolledBackMsg = "ROLLED BACK TO ORIGINAL APPLICATION FILE.";
 			checkClientAndServerMessages(rolledBackMsg, rolledBackMsg, true);
 
-
+		}
+		finally {
 			// The original EAR should remain deployed.
 			if( ejtt.deployment.isDeployedAccordingToEmbJopr(APP_TYPE, DEPLOYABLE_NAME)){
 				ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
@@ -228,13 +229,7 @@
 				throw new EmbJoprTestException("The original EAR should remain deployed " +
 								"after unsuccessful deployment of bad version of the same EAR.");
 			}
-
-			// Undeploy the original app.
-			ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
 		}
-		finally {
-
-		}
 	}
 
 

Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java	2009-07-29 22:41:58 UTC (rev 631)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/EjbTestBase.java	2009-07-29 23:37:53 UTC (rev 632)
@@ -29,7 +29,6 @@
 import java.util.*;
 import javax.faces.application.FacesMessage;
 import junit.framework.Test;
-import junit.framework.TestSuite;
 import org.apache.commons.io.FileUtils;
 import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
 import org.jboss.jopr.jsfunit.exceptions.*;
@@ -57,7 +56,8 @@
 	 * @return the suite of tests being tested
 	 */
 	public static Test suite() {
-		return new TestSuite(EjbTestBase.class);
+		throw new UnsupportedOperationException("suite() method must be overriden.");
+		//return new TestSuite(EjbTestBase.class);
 	}
 
 



More information about the embjopr-commits mailing list