Author: jjankovi
Date: 2012-05-24 03:33:12 -0400 (Thu, 24 May 2012)
New Revision: 41337
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveNode.java
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveTest.java
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingProjectTest.java
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java
Log:
refactoring
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveNode.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveNode.java 2012-05-24
07:32:54 UTC (rev 41336)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveNode.java 2012-05-24
07:33:12 UTC (rev 41337)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.archives.ui.bot.test;
-import org.jboss.tools.archives.ui.bot.test.view.ProjectArchivesView;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -31,10 +30,8 @@
@Test
public void testBuildingArchiveNode() {
- ProjectArchivesView view = new ProjectArchivesView();
- view.show();
- projectExplorer.selectProject(projectName);
- view.buildArchiveNode(projectName, archiveName);
+ viewForProject(projectName).
+ buildArchiveNode(projectName, archiveName);
}
}
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveTest.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveTest.java 2012-05-24
07:32:54 UTC (rev 41336)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingArchiveTest.java 2012-05-24
07:33:12 UTC (rev 41337)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.archives.ui.bot.test;
-import org.jboss.tools.archives.ui.bot.test.explorer.ProjectArchivesExplorer;
-import org.jboss.tools.archives.ui.bot.test.view.ProjectArchivesView;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -32,17 +30,14 @@
@Test
public void testBuildingArchiveWithView() {
- ProjectArchivesView view = new ProjectArchivesView();
- view.show();
- projectExplorer.selectProject(projectName);
- view.buildArchiveFull(projectName, archiveName);
+ viewForProject(projectName)
+ .buildArchiveFull(projectName, archiveName);
}
@Test
public void testBuildingArchiveWithExplorer() {
- ProjectArchivesExplorer explorer =
- new ProjectArchivesExplorer(projectName);
- explorer.buildArchiveFull(archiveName);
+ explorerForProject(projectName)
+ .buildArchiveFull(archiveName);
}
}
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingProjectTest.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingProjectTest.java 2012-05-24
07:32:54 UTC (rev 41336)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/BuildingProjectTest.java 2012-05-24
07:33:12 UTC (rev 41337)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.archives.ui.bot.test;
-import org.jboss.tools.archives.ui.bot.test.explorer.ProjectArchivesExplorer;
-import org.jboss.tools.archives.ui.bot.test.view.ProjectArchivesView;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -31,17 +29,12 @@
@Test
public void testBuildingProjectWithView() {
- ProjectArchivesView view = new ProjectArchivesView();
- view.show();
- projectExplorer.selectProject(projectName);
- view.buildProjectFull(projectName);
+ viewForProject(projectName).buildProjectFull(projectName);
}
@Test
public void testBuildingProjectWithExplorer() {
- ProjectArchivesExplorer explorer =
- new ProjectArchivesExplorer(projectName);
- explorer.buildProjectFull();
+ explorerForProject(projectName).buildProjectFull();
}
}
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java 2012-05-24
07:32:54 UTC (rev 41336)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java 2012-05-24
07:33:12 UTC (rev 41337)
@@ -35,46 +35,47 @@
@Test
public void testCreatingArchivetWithView() {
- ProjectArchivesView view = new ProjectArchivesView();
- view.show();
- projectExplorer.selectProject(project1);
+ ProjectArchivesView view = viewForProject(project1);
/* creating JAR archive from project1 - standard way */
NewJarDialog dialog = view.createNewJarArchive(project1);
- dialog.setArchiveName(project1 + "-standard");
- dialog.setZipStandardArchiveType();
- dialog.finish();
+ createArchive(dialog, project1 + "-standard", true);
assertTrue(view.itemExists(project1,
project1 + "-standard.jar [/" + project1 + "]"));
/* creating JAR archive from project1 - no compression way */
dialog = view.createNewJarArchive(project1);
- dialog.setArchiveName(project1 + "-nocompression");
- dialog.setNoCompressionArchiveType();
- dialog.finish();
+ createArchive(dialog, project1 + "-nocompression", false);
assertTrue(view.itemExists(project1,
project1 + "-nocompression.jar [/" + project1 + "]"));
}
@Test
public void testCreatingArchiveWithExplorer() {
- ProjectArchivesExplorer explorer = new ProjectArchivesExplorer(project1);
+ ProjectArchivesExplorer explorer = explorerForProject(project1);
/* creating JAR archive from project1 - standard way */
NewJarDialog dialog = explorer.createNewJarArchive();
- dialog.setArchiveName(project1 + "-standard-expl");
- dialog.setZipStandardArchiveType();
- dialog.finish();
+ createArchive(dialog, project1 + "-standard-expl", true);
assertTrue(explorer.itemExists(
project1 + "-standard-expl.jar [/" + project1 + "]"));
/* creating JAR archive from project1 - no compression way */
dialog = explorer.createNewJarArchive();
- dialog.setArchiveName(project1 + "-nocompression-expl");
- dialog.setNoCompressionArchiveType();
- dialog.finish();
+ createArchive(dialog, project1 + "-nocompression-expl", false);
assertTrue(explorer.itemExists(
project1 + "-nocompression-expl.jar [/" + project1 + "]"));
}
+ private void createArchive(NewJarDialog dialog, String archiveName,
+ boolean standardCompression) {
+ dialog.setArchiveName(archiveName);
+ if (standardCompression) {
+ dialog.setZipStandardArchiveType();
+ } else {
+ dialog.setNoCompressionArchiveType();
+ }
+ dialog.finish();
+ }
+
}
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java
===================================================================
---
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java 2012-05-24
07:32:54 UTC (rev 41336)
+++
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/context/ArchiveContextMenu.java 2012-05-24
07:33:12 UTC (rev 41337)
@@ -16,6 +16,7 @@
import org.jboss.tools.archives.ui.bot.test.dialog.ArchivePublishSettingsDialog;
import org.jboss.tools.archives.ui.bot.test.dialog.EditArchiveDialog;
import org.jboss.tools.archives.ui.bot.test.dialog.NewJarDialog;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
/**
@@ -65,6 +66,7 @@
SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
getContextMenu(tree, "Delete Archive", false));
menu.click();
+ SWTBotFactory.getUtil().waitForNonIgnoredJobs();
}
public ArchivePublishSettingsDialog publishToServer(SWTBotTree tree,
Show replies by date