Author: ozizka(a)redhat.com
Date: 2009-03-17 10:17:59 -0400 (Tue, 17 Mar 2009)
New Revision: 228
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java
Log:
EAR tests changes
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java 2009-03-16
16:23:04 UTC (rev 227)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/EarTest.java 2009-03-17
14:17:59 UTC (rev 228)
@@ -22,7 +22,6 @@
package org.jboss.jopr.jsfunit.as5;
-import java.net.URL;
import org.jboss.jopr.jsfunit.util.DescribedCondition;
import org.jboss.jopr.jsfunit.util.ActiveConditionChecker;
import org.jboss.jopr.jsfunit.*;
@@ -34,7 +33,6 @@
import javax.faces.application.FacesMessage;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.jboss.jopr.jsfunit.AppConstants.DeployableTypes;
import org.jboss.jopr.jsfunit.exceptions.*;
@@ -94,27 +92,30 @@
public void testBasicEarDeployment() throws IOException, EmbJoprTestException
{
- // Deploy the EAR.
- String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) +
"/ear/"+BASIC_EAR;
- deployEar( earFilePath );
+ try {
+ // Deploy the EAR.
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) +
"/ear/"+BASIC_EAR;
+ deployEar( earFilePath );
- String expectedMessage = BASIC_EAR + " created successfully";
+ String expectedMessage = BASIC_EAR + " created successfully";
- checkClientAndServerMessages(expectedMessage, expectedMessage, false);
+ checkClientAndServerMessages(expectedMessage, expectedMessage, false);
- // Use JMX to assert that the EAR components really did deploy successfully.
- //id="vfszip:/home/brq/ozizka/JoprEmbedded/jboss-as-5.x/build/output/jboss-5.1.0.Beta1/server/default/deploy/eardeployment.ear/",type=Deployment
- //id="vfszip:/home/ondra/work/JOPRembedded/embjopr-svn-trunk/jsfunit/target/jboss5x/deploy/eardeployment.ear",*
not found.
- assertTrue("JMX doesn't report EAR as deployed: eardeployment.ear",
isEarDeployed(BASIC_EAR));
- assertTrue("JMX doesn't report EJB sessiona.jar as deployed.",
isEJBDeployed("sessiona.jar"));
- assertTrue("JMX doesn't report EJB sessionb.jar as deployed.",
isEJBDeployed("sessionb.jar"));
+ // Use JMX to assert that the EAR components really did deploy successfully.
+ //id="vfszip:/home/brq/ozizka/JoprEmbedded/jboss-as-5.x/build/output/jboss-5.1.0.Beta1/server/default/deploy/eardeployment.ear/",type=Deployment
+ //id="vfszip:/home/ondra/work/JOPRembedded/embjopr-svn-trunk/jsfunit/target/jboss5x/deploy/eardeployment.ear",*
not found.
+ assertTrue("JMX doesn't report EAR as deployed: eardeployment.ear",
isEarDeployed(BASIC_EAR));
+ assertTrue("JMX doesn't report EJB sessiona.jar as deployed.",
isEJBDeployed("sessiona.jar"));
+ assertTrue("JMX doesn't report EJB sessionb.jar as deployed.",
isEJBDeployed("sessionb.jar"));
+ }
+ finally {
+ // Undeploy the EAR.
+ undeployEar( BASIC_EAR );
- // Undeploy the EAR.
- undeployEar( BASIC_EAR );
+ String expectedMessage = "Successfully deleted Enterprise Application (EAR)
'"+BASIC_EAR+"'.";
+ assertTrue(client.getPageAsText().contains( expectedMessage ));
+ }
- expectedMessage = "Successfully deleted Enterprise Application (EAR)
'"+BASIC_EAR+"'.";
- assertTrue(client.getPageAsText().contains( expectedMessage ));
-
// This assert doesn't work. The JXM view is not consistent with the mananaged
view.
// JBAS-XXXX
//assertFalse(isEarDeployed("eardeployment.ear"));
@@ -138,13 +139,17 @@
verify the archive has been deployed successfully.
*/
- public void DISABLEDtestBadEarRedeploy() throws IOException,
HtmlElementNotFoundException {
+ public void DISABLEDtestBadEarRedeploy() throws IOException,
HtmlElementNotFoundException, ActionNotAvailableException {
- String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) +
"/ear/"+EAR_MALFORMED_APP_FILENAME;
- deployEar(earFilePath);
+ try {
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) +
"/ear/"+EAR_MALFORMED_APP_FILENAME;
+ deployEar(earFilePath);
- checkClientAndServerMessages("Failed to create Resource", "Failed to
create Resource", true);
-
+ checkClientAndServerMessages("Failed to create Resource", "Failed to
create Resource", true);
+ }
+ finally {
+ undeployEar(BASIC_EAR);
+ }
}
@@ -466,7 +471,7 @@
// Navigate to the Configuration tab
ContentTableRow earRow =
ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_EAR);
earRow.getLinkByLabel(BASIC_EAR).click();
- ejtt.tabMenu.clickControlTab();
+ ejtt.tabMenu.clickContentTab();
String xPath = ".//table//input[@type='file']";
HtmlFileInput fileInput =
ejtt.tabMenu.getTabContentBox().getElement().getFirstByXPath(xPath);
@@ -539,8 +544,9 @@
// Resource Traits
// Check the Path.
- ContentInfoTable infoTable = ejtt.getContentInfoTable(
- ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Resource
Traits").getElement() );
+ HtmlTable tbl = ejtt.getTabMenu().getTabContentBox().
+ getTableUnderHeader("Trait Values").getElement();
+ ContentInfoTable infoTable = ejtt.getContentInfoTable( tbl );
Properties props = infoTable.getProperties();
String path = ejtt.getDeployDir()+"/"+BASIC_EAR;
Show replies by date