[jbosstools-commits] JBoss Tools SVN: r20381 - trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Feb 19 05:28:31 EST 2010


Author: vpakan at redhat.com
Date: 2010-02-19 05:28:31 -0500 (Fri, 19 Feb 2010)
New Revision: 20381

Modified:
   trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
Log:
Create Server Runtime only when there is no server runtime defined.

Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java	2010-02-19 10:27:41 UTC (rev 20380)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java	2010-02-19 10:28:31 UTC (rev 20381)
@@ -11,8 +11,6 @@
 
 package org.jboss.tools.struts.ui.bot.test.smoke;
 
-import static org.junit.Assert.assertTrue;
-
 import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
 import org.jboss.tools.ui.bot.ext.SWTJBTExt;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
@@ -33,12 +31,13 @@
    */
   @Test
 	public void testCreateNewStrutsProject() {
-    
+    if (!SWTJBTExt.isServerRuntimeDefined(bot)){
+      eclipse.addServerRuntime(IDELabel.ServerRuntimeName.JBOSS_EAP_4_3,
+          IDELabel.ServerGroup.JBOSS_EAP_4_3,
+          IDELabel.ServerRuntimeType.JBOSS_EAP_4_3,
+          StrutsAllBotTests.getProperty("JBossEap4.3Home"));
+    }
 	  eclipse.showView(ViewType.WEB_PROJECTS);
-	  eclipse.addServerRuntime(IDELabel.ServerRuntimeName.JBOSS_EAP_4_3,
-	    IDELabel.ServerGroup.JBOSS_EAP_4_3,
-	    IDELabel.ServerRuntimeType.JBOSS_EAP_4_3,
-	    StrutsAllBotTests.getProperty("JBossEap4.3Home"));
 	  eclipse.createNew(EntityType.STRUTS_PROJECT);
 	  bot.shell(IDELabel.Shell.NEW_STRUTS_PROJECT).activate();
 	  bot.textWithLabel(IDELabel.NewStrutsProjectDialog.NAME).setText(StrutsAllBotTests.STRUTS_PROJECT_NAME);
@@ -53,7 +52,6 @@
 		assertTrue("Project "+ StrutsAllBotTests.STRUTS_PROJECT_NAME + " was not created properly.",
 		  SWTEclipseExt.treeContainsItemWithLabel(bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree(),
 	      StrutsAllBotTests.STRUTS_PROJECT_NAME));
-		  
 	}
 	
 }



More information about the jbosstools-commits mailing list