Author: dgolovin
Date: 2009-03-03 02:17:21 -0500 (Tue, 03 Mar 2009)
New Revision: 13945
Removed:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/.classpath
trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/test/VerificationUiAllTests.java
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
Log:
increase test coverage
Modified: trunk/common/tests/org.jboss.tools.common.verification.ui.test/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.ui.test/.classpath 2009-03-03
05:57:46 UTC (rev 13944)
+++ trunk/common/tests/org.jboss.tools.common.verification.ui.test/.classpath 2009-03-03
07:17:21 UTC (rev 13945)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Deleted:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/common/tests/org.jboss.tools.common.verification.ui.test/.settings/org.eclipse.jdt.core.prefs 2009-03-03
05:57:46 UTC (rev 13944)
+++
trunk/common/tests/org.jboss.tools.common.verification.ui.test/.settings/org.eclipse.jdt.core.prefs 2009-03-03
07:17:21 UTC (rev 13945)
@@ -1,7 +0,0 @@
-#Tue Feb 17 14:01:31 PST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
Modified:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF
===================================================================
---
trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF 2009-03-03
05:57:46 UTC (rev 13944)
+++
trunk/common/tests/org.jboss.tools.common.verification.ui.test/META-INF/MANIFEST.MF 2009-03-03
07:17:21 UTC (rev 13945)
@@ -8,4 +8,5 @@
org.eclipse.jface,
org.jboss.tools.common.verification.ui,
org.jboss.tools.common.model.ui
-Export-Package: org.jboss.tools.common.verification.ui.vrules.preferences.test
+Export-Package: org.jboss.tools.common.verification.ui.test,
+ org.jboss.tools.common.verification.ui.vrules.preferences.test
Modified:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/test/VerificationUiAllTests.java
===================================================================
---
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/test/VerificationUiAllTests.java 2009-03-03
05:57:46 UTC (rev 13944)
+++
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/test/VerificationUiAllTests.java 2009-03-03
07:17:21 UTC (rev 13945)
@@ -1,4 +1,3 @@
-package org.jboss.tools.common.verification.ui.test;
/*******************************************************************************
* Copyright (c) 2007 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
@@ -10,9 +9,24 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
+package org.jboss.tools.common.verification.ui.test;
+
+import
org.jboss.tools.common.verification.ui.vrules.preferences.test.VerificationPreferencePageTest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
/**
* @author eskimo
*
*/
public class VerificationUiAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ suite.setName("Verification UI Test");
+ suite.addTestSuite(VerificationPreferencePageTest.class);
+ return suite;
+ }
+
}
Modified:
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java
===================================================================
---
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java 2009-03-03
05:57:46 UTC (rev 13944)
+++
trunk/common/tests/org.jboss.tools.common.verification.ui.test/src/org/jboss/tools/common/verification/ui/vrules/preferences/test/VerificationPreferencePageTest.java 2009-03-03
07:17:21 UTC (rev 13945)
@@ -12,7 +12,10 @@
package org.jboss.tools.common.verification.ui.vrules.preferences.test;
import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
import
org.jboss.tools.common.verification.ui.vrules.preferences.VerificationPreferencePage;
+import org.jboss.tools.test.util.SwtUtils;
import org.jboss.tools.test.util.WorkbenchUtils;
import org.jboss.tools.tests.PreferencePageTest;
@@ -24,10 +27,23 @@
*/
public class VerificationPreferencePageTest extends PreferencePageTest {
+ public static final String ID = "org.jboss.tools.common.verification.ui";
public void testShowVerificationPreferencePage() {
- doDefaultTest(
- "org.jboss.tools.common.verification.ui",
- VerificationPreferencePage.class);
+
+ doDefaultTest(ID, VerificationPreferencePage.class);
+
+ PreferenceDialog dialog = null;
+ try {
+ dialog = WorkbenchUtils.createPreferenceDialog(ID);
+ dialog.open();
+ VerificationPreferencePage page =
(VerificationPreferencePage)dialog.getSelectedPage();
+ TabFolder tabs = (TabFolder)SwtUtils.findControlByClass((Composite)page.getControl(),
TabFolder.class);
+ tabs.setSelection(0);
+ tabs.setSelection(1);
+ } finally {
+ dialog.close();
+ }
}
+
}
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2009-03-03 05:57:46 UTC
(rev 13944)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2009-03-03 07:17:21 UTC
(rev 13945)
@@ -430,4 +430,11 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.common.verification.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
===================================================================
---
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2009-03-03
05:57:46 UTC (rev 13944)
+++
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2009-03-03
07:17:21 UTC (rev 13945)
@@ -81,8 +81,10 @@
}
public static PreferenceDialog createPreferenceDialog(String pageId) {
- return PreferencesUtil.createPreferenceDialogOn(WorkbenchUtils
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(WorkbenchUtils
.getActiveShell(), pageId, new String[] {pageId}, null);
+ dialog.setBlockOnOpen(false);
+ return dialog;
}
public static PreferenceDialog createPropertyDialog(String pageId,
Show replies by date