Author: dgolovin
Date: 2009-11-11 21:12:28 -0500 (Wed, 11 Nov 2009)
New Revision: 18635
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/ArchivesUITestSuite.java
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/wizards/NewJARWizardTest.java
Log:
empty tests for archives.ui
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/ArchivesUITestSuite.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/ArchivesUITestSuite.java 2009-11-12
01:06:52 UTC (rev 18634)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/ArchivesUITestSuite.java 2009-11-12
02:12:28 UTC (rev 18635)
@@ -4,18 +4,20 @@
import org.jboss.ide.eclipse.archives.ui.test.wizards.FilesetWizardTest;
import org.jboss.ide.eclipse.archives.ui.test.wizards.NewJARWizardTest;
import org.jboss.ide.eclipse.archives.ui.views.ProjectArchivesCommonView;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
public class ArchivesUITestSuite {
+ public static final String TEST_SUITE_BUNDLE_ID =
"org.jboss.ide.eclipse.archives.ui.test";
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(MainPreferencePageTest.class);
suite.addTestSuite(ProjectArchivesCommonView.class);
suite.addTestSuite(FilesetWizardTest.class);
suite.addTestSuite(NewJARWizardTest.class);
- return suite;
+ return new ProjectImportTestSetup(suite,
TEST_SUITE_BUNDLE_ID,"projects/archive-test", "archive-test");
}
}
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/wizards/NewJARWizardTest.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/wizards/NewJARWizardTest.java 2009-11-12
01:06:52 UTC (rev 18634)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.ui.test/src/org/jboss/ide/eclipse/archives/ui/test/wizards/NewJARWizardTest.java 2009-11-12
02:12:28 UTC (rev 18635)
@@ -3,15 +3,37 @@
import junit.framework.TestCase;
import org.eclipse.core.commands.IParameter;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ISetSelectionTarget;
import org.jboss.ide.eclipse.archives.ui.wizards.NewJARWizard;
import org.jboss.ide.eclipse.archives.ui.wizards.pages.ArchiveInfoWizardPage;
+import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.test.util.WorkbenchUtils;
public class NewJARWizardTest extends TestCase {
+ IProject project = null;
+
+ @Override
+ protected void setUp() throws Exception {
+ project =
ResourcesPlugin.getWorkspace().getRoot().getProject("archives-example");
+// IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();
+// IViewPart view= page.showView(IPageLayout.ID_RES_NAV);
+// if (view instanceof ISetSelectionTarget) {
+// ISelection selection= new StructuredSelection(resource);
+// ((ISetSelectionTarget)view).selectReveal(selection);
+// }
+ }
+
public void testJarWizardIsOpened() {
IWizard
aWizard = new NewJARWizard();
@@ -20,11 +42,13 @@
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
aWizard);
dialog.setBlockOnOpen(false);
- dialog.open();
+ dialog.create();
try {
ArchiveInfoWizardPage page = (ArchiveInfoWizardPage)dialog.getSelectedPage();
+
} finally {
dialog.close();
}
+
}
}