Author: Grid.Qian
Date: 2008-06-13 04:37:02 -0400 (Fri, 13 Jun 2008)
New Revision: 8756
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/preferences/
trunk/ws/tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/preferences/JbossWSRuntimePreferencePageTest.java
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF
Log:
JBIDE-2323: add some tests
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF 2008-06-13 08:36:53 UTC
(rev 8755)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF 2008-06-13 08:37:02 UTC
(rev 8756)
@@ -5,5 +5,8 @@
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.ws.ui.test.Activator
Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
+ org.eclipse.core.runtime,
+ org.junit,
+ org.jboss.tools.tests,
+ org.jboss.tools.ws.ui
Eclipse-LazyStart: true
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/preferences/JbossWSRuntimePreferencePageTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/preferences/JbossWSRuntimePreferencePageTest.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.test/src/org/jboss/tools/ws/ui/test/preferences/JbossWSRuntimePreferencePageTest.java 2008-06-13
08:37:02 UTC (rev 8756)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.ui.test.preferences;
+
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.jboss.tools.test.util.WorkbenchUtils;
+import org.jboss.tools.ws.ui.preferences.JbossWSRuntimePreferencePage;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Grid Qian
+ */
+public class JbossWSRuntimePreferencePageTest extends TestCase {
+
+ /**
+ * Test that preference page is showed up without errors
+ */
+ public void testShowSeamPreferencePage() {
+
+ PreferenceDialog prefDialog =
+ WorkbenchUtils.createPreferenceDialog("org.jboss.tools.ws.ui.preferences.JbossWSRuntimePreferencePage");
+
+ try {
+ prefDialog.setBlockOnOpen(false);
+ prefDialog.open();
+
+ Object selectedPage = prefDialog.getSelectedPage();
+ assertTrue("Selected page is not an instance of
JbossWSRuntimePreferencePage", selectedPage instanceof
JbossWSRuntimePreferencePage);
+ } finally {
+ prefDialog.close();
+ }
+ }
+}