[jbosstools-commits] JBoss Tools SVN: r35520 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Oct 10 14:35:04 EDT 2011
Author: akazakov
Date: 2011-10-10 14:35:04 -0400 (Mon, 10 Oct 2011)
New Revision: 35520
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9844 Cleanup perspectives
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java 2011-10-10 18:23:58 UTC (rev 35519)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java 2011-10-10 18:35:04 UTC (rev 35520)
@@ -15,6 +15,7 @@
import junit.framework.TestCase;
+import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.test.util.WorkbenchUtils;
@@ -24,6 +25,10 @@
*/
public class CDIPerspectiveTest extends TestCase {
+ /**
+ * Tests JEE perspective has CDI/JSF stuff
+ * @throws WorkbenchException
+ */
public void testPerspective() throws WorkbenchException {
IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage("org.eclipse.jst.j2ee.J2EEPerspective", null);
assertNotNull(page);
@@ -41,5 +46,11 @@
assertTrue("Have not found org.jboss.tools.cdi.ui.wizard.NewDecoratorCreationWizard in org.eclipse.jst.j2ee.J2EEPerspective.", shortcutSet.contains("org.jboss.tools.cdi.ui.wizard.NewDecoratorCreationWizard"));
assertTrue("Have not found org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralCreationWizard in org.eclipse.jst.j2ee.J2EEPerspective.", shortcutSet.contains("org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralCreationWizard"));
assertTrue("Have not found org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard in org.eclipse.jst.j2ee.J2EEPerspective.", shortcutSet.contains("org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard"));
+ IViewReference[] viewReferences = page.getViewReferences();
+ Set<String> viewIds = new HashSet<String>();
+ for (IViewReference viewReference : viewReferences) {
+ viewIds.add(viewReference.getId());
+ }
+ assertTrue("Have not found org.eclipse.gef.ui.palette_view in org.eclipse.jst.j2ee.J2EEPerspective.", viewIds.contains("org.eclipse.gef.ui.palette_view"));
}
}
\ No newline at end of file
More information about the jbosstools-commits
mailing list