Author: dgolovin
Date: 2010-10-26 13:44:41 -0400 (Tue, 26 Oct 2010)
New Revision: 26074
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java
Log:
Simple as perspective and view tests are added to increase code coverage
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-10-26 17:42:33
UTC (rev 26073)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-10-26 17:44:41
UTC (rev 26074)
@@ -58,6 +58,8 @@
org.jboss.ide.eclipse.as.ui.dialogs,
org.jboss.ide.eclipse.as.ui.editor,
org.jboss.ide.eclipse.as.ui.launch,
+ org.jboss.ide.eclipse.as.ui.perspective,
+ org.jboss.ide.eclipse.as.ui.views,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
org.jboss.ide.eclipse.as.ui.wizards,
org.jboss.tools.as.wst.server.ui.xpl
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2010-10-26
17:42:33 UTC (rev 26073)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2010-10-26
17:44:41 UTC (rev 26074)
@@ -37,6 +37,8 @@
*/
public class ASPerspective implements IPerspectiveFactory {
+ public static final String ID = "org.jboss.ide.eclipse.as.ui.ASPerspective";
+
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
(rev 0)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java 2010-10-26
17:44:41 UTC (rev 26074)
@@ -0,0 +1,31 @@
+package org.jboss.ide.eclipse.as.ui.perspective.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.as.ui.perspective.ASPerspective;
+import org.jboss.ide.eclipse.as.ui.views.ServerLogView;
+
+public class ASPerspectiveTest extends TestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().setPerspective(
+ PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(ASPerspective.ID));
+ }
+
+ public void testASPerspective() {
+ IPerspectiveDescriptor perspective = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getPerspective();
+ assertEquals(perspective.getLabel(),"JBoss AS");
+ }
+
+ public void testServerLogView() throws PartInitException {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().showView(ServerLogView.VIEW_ID);
+ }
+
+}
Property changes on:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/perspective/test/ASPerspectiveTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java
===================================================================
---
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java 2010-10-26
17:42:33 UTC (rev 26073)
+++
trunk/as/tests/org.jboss.ide.eclipse.as.ui.test/src/org/jboss/ide/eclipse/as/ui/test/AsUiAllTests.java 2010-10-26
17:44:41 UTC (rev 26074)
@@ -1,5 +1,6 @@
package org.jboss.ide.eclipse.as.ui.test;
+import org.jboss.ide.eclipse.as.ui.perspective.test.ASPerspectiveTest;
import org.jboss.ide.eclipse.as.ui.wizards.test.NewServerWizardTest;
import junit.framework.Test;
@@ -10,6 +11,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(AsUiAllTests.class.getName());
suite.addTestSuite(NewServerWizardTest.class);
+ suite.addTestSuite(ASPerspectiveTest.class);
return suite;
}