Author: nickboldt
Date: 2009-11-09 23:01:09 -0500 (Mon, 09 Nov 2009)
New Revision: 18556
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/Activator.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
Log:
recover from accidental delete (why does src == bin?)
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/Activator.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/Activator.java
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/Activator.java 2009-11-10
04:01:09 UTC (rev 18556)
@@ -0,0 +1,50 @@
+package org.jboss.tools.bpel.ui.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java 2009-11-10
04:01:09 UTC (rev 18556)
@@ -0,0 +1,19 @@
+package org.jboss.tools.bpel.ui.test;
+
+import org.jboss.tools.bpel.ui.test.editor.JBossBPELEditorTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+
+public class BpelUIAllTests extends TestCase {
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
+ public static Test suite ()
+ {
+ TestSuite suite = new TestSuite(BpelUIAllTests.class.getName());
+
+ suite.addTestSuite(JBossBPELEditorTest.class);
+ return suite;
+ }
+}
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java 2009-11-10
04:01:09 UTC (rev 18556)
@@ -0,0 +1,60 @@
+package org.jboss.tools.bpel.ui.test.editor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+
+import junit.framework.TestCase;
+
+public class JBossBPELEditorTest extends TestCase{
+
+ static String bpelFileName = "HelloWorld.bpel";
+ IProject fproject;
+ IFile bpelFile;
+ static String BUNDLE = "org.jboss.tools.bpel.ui.test";
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ //create jboss bpel project
+ fproject = createProject("ODE_Test");
+ bpelFile = fproject.getProject().getFile(bpelFileName);
+ assertTrue(bpelFile.exists());
+ }
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+
+ }
+
+ public void testOpenEditor(){
+ IEditorPart bpelEditor = openEditor(bpelFile.getFullPath().toString());
+ assertNotNull(bpelEditor);
+ }
+
+ public IProject createProject(String prjName) throws CoreException {
+ TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" +
prjName,
+ prjName, true);
+ IProject prj = provider.getProject();
+ assertNotNull(prj);
+ return prj;
+ }
+
+ public static IEditorPart openEditor(String inputFile) {
+ IEditorPart part = null;
+ try {
+ part =
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(inputFile)));
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
+}
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date