Skip to content
Snippets Groups Projects
Commit bfb8c377 authored by Sebastian Krings's avatar Sebastian Krings
Browse files

refactored test case from fragment to plugin

parent de09d54e
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<classpath> <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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -3,6 +3,12 @@ Bundle-ManifestVersion: 2 ...@@ -3,6 +3,12 @@ Bundle-ManifestVersion: 2
Bundle-Name: Tests Bundle-Name: Tests
Bundle-SymbolicName: de.prob.core.tests Bundle-SymbolicName: de.prob.core.tests
Bundle-Version: 1.0.0.qualifier Bundle-Version: 1.0.0.qualifier
Fragment-Host: de.prob.core Bundle-Activator: de.prob.core.tests.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="4.8.2",
org.eventb.core;bundle-version="[2.1.0,2.6.0)",
de.prob.core;bundle-version="9.3.0",
de.prob.units;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="4.8.2"
package de.prob.core.tests;
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 = "de.prob.core.tests"; //$NON-NLS-1$
// 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;
}
}
...@@ -11,6 +11,7 @@ import org.junit.Before; ...@@ -11,6 +11,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import de.prob.core.translator.TranslationFailedException; import de.prob.core.translator.TranslationFailedException;
import de.prob.eventb.translator.TranslatorFactory;
public class MachineWithVariablesTest extends AbstractEventBTests { public class MachineWithVariablesTest extends AbstractEventBTests {
private StringWriter stringWriter; private StringWriter stringWriter;
...@@ -42,10 +43,10 @@ public class MachineWithVariablesTest extends AbstractEventBTests { ...@@ -42,10 +43,10 @@ public class MachineWithVariablesTest extends AbstractEventBTests {
assertEquals(1, machine.getVariables().length); assertEquals(1, machine.getVariables().length);
assertEquals(1, machine.getSCMachineRoot().getSCVariables().length); assertEquals(1, machine.getSCMachineRoot().getSCVariables().length);
// TranslatorFactory.translate(machine, writer); TranslatorFactory.translate(machine, writer);
// assertEquals( assertEquals(
// "package(load_event_b_project([event_b_model(none,'TestMachine',[sees(none,[]),variables(none,[identifier(none,v1)]),invariant(none,[equal(rodinpos('TestMachine',inv1,'('),identifier(none,v1),integer(none,5))]),theorems(none,[]),events(none,[])])],[],[exporter_version(2)],_Error)).\n", "package(load_event_b_project([event_b_model(none,'TestMachine',[sees(none,[]),variables(none,[identifier(none,v1)]),invariant(none,[equal(rodinpos('TestMachine',inv1,'('),identifier(none,v1),integer(none,5))]),theorems(none,[]),events(none,[])])],[],[exporter_version(2)],_Error)).\n",
// stringWriter.getBuffer().toString()); stringWriter.getBuffer().toString());
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment