diff --git a/de.prob.core.tests/src/de/prob/core/domainobjects/ltl/tests/LtlTestDescription.java b/de.prob.core.tests/src/de/prob/core/domainobjects/ltl/tests/LtlTestDescription.java index 7b3aeaec5ea8aa687a4332b5f4f81c6165779cb8..1dc73fc0a360becab86ad366e0f996c46d71e82c 100644 --- a/de.prob.core.tests/src/de/prob/core/domainobjects/ltl/tests/LtlTestDescription.java +++ b/de.prob.core.tests/src/de/prob/core/domainobjects/ltl/tests/LtlTestDescription.java @@ -8,7 +8,6 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import junit.framework.Assert; import de.prob.core.command.LtlCheckingCommand.PathType; import de.prob.core.domainobjects.ltl.CounterExample; import de.prob.core.domainobjects.ltl.CounterExampleBinaryOperator; @@ -17,6 +16,8 @@ import de.prob.core.domainobjects.ltl.CounterExampleProposition; import de.prob.core.domainobjects.ltl.CounterExampleUnaryOperator; import de.prob.core.domainobjects.ltl.CounterExampleValueType; +import org.junit.Assert; + public class LtlTestDescription { private final CounterExample counterExample; private final Map<String, ArrayList<int[]>> expectedHighlights = new HashMap<String, ArrayList<int[]>>(); diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractEventBTests.java b/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractEventBTests.java index c103bc2d66ac2c8771fc334bae41f124224a8756..4813f8623c6b885b7a8b75aa8b7241ffb787b84e 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractEventBTests.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractEventBTests.java @@ -37,6 +37,10 @@ import org.rodinp.core.RodinCore; import org.rodinp.core.RodinDBException; import org.rodinp.internal.core.debug.DebugHelpers; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + /** * @author htson * <p> @@ -60,33 +64,8 @@ public abstract class AbstractEventBTests extends AbstractTests { */ protected static final FormulaFactory ff = FormulaFactory.getDefault(); - /** - * Constructor: Create max_size test case. - */ - public AbstractEventBTests() { - super(); - } - - /** - * Constructor: Create max_size test case with the given name. - * - * @param name - * the name of test - */ - public AbstractEventBTests(String name) { - super(name); - } - - /* - * (non-Javadoc) - * - * @see junit.framework.TestCase#setUp() - */ @Before - @Override - protected void setUp() throws Exception { - super.setUp(); - + public void setUp() throws Exception { // ensure autobuilding is turned off IWorkspaceDescription wsDescription = workspace.getDescription(); if (wsDescription.isAutoBuilding()) { @@ -102,16 +81,9 @@ public abstract class AbstractEventBTests extends AbstractTests { } - /* - * (non-Javadoc) - * - * @see junit.framework.TestCase#tearDown() - */ @After - @Override - protected void tearDown() throws Exception { + public void tearDown() throws Exception { workspace.getRoot().delete(true, null); - super.tearDown(); } // ========================================================================= diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractTests.java b/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractTests.java index 2978f9bab4d93a7d183f8368b2c6f4160d79d1cc..3c0980086e9b5f3bd02c07a456b4e96fa4326008 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractTests.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/AbstractTests.java @@ -4,7 +4,9 @@ import java.util.Collection; import java.util.Map; import java.util.Set; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; /** * @author htson @@ -12,25 +14,7 @@ import junit.framework.TestCase; * This abstract class contains utility methods supporting testing. * </p> */ -public abstract class AbstractTests extends TestCase { - - /** - * Constructor: Create max_size test case. - */ - public AbstractTests() { - super(); - } - - /** - * Constructor: Create max_size test case with the given name. - * - * @param name - * the name of test - */ - public AbstractTests(String name) { - super(name); - } - +public abstract class AbstractTests { /** * Utility method to compare two string collections. The expected collection * is given in terms of an array of strings. The actual collection is given diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/ContextChainTest.java b/de.prob.core.tests/src/de/prob/core/translator/tests/ContextChainTest.java index b871dd93f8a9dcf55b35dfd85696e5c25c7b7374..0a5914fb7350661b79817e77b1805ea643e8a76a 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/ContextChainTest.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/ContextChainTest.java @@ -22,7 +22,7 @@ public class ContextChainTest extends AbstractEventBTests { @Before @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); stringWriter = new StringWriter(); writer = new PrintWriter(stringWriter); diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/ContextWithConstantsTest.java b/de.prob.core.tests/src/de/prob/core/translator/tests/ContextWithConstantsTest.java index 2919be6f26dfbfb70481106def3d1db69ed9db1f..6691aef446519ea5c3f82af40b201182ad1f667d 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/ContextWithConstantsTest.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/ContextWithConstantsTest.java @@ -22,7 +22,7 @@ public class ContextWithConstantsTest extends AbstractEventBTests { @Before @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); stringWriter = new StringWriter(); writer = new PrintWriter(stringWriter); diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/EmptyTranslationsTest.java b/de.prob.core.tests/src/de/prob/core/translator/tests/EmptyTranslationsTest.java index 5a64393ced6892caee82e3f4d9f0b89c56121180..d9fa734be466ce637f84e64abca5778dc95070ff 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/EmptyTranslationsTest.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/EmptyTranslationsTest.java @@ -23,7 +23,7 @@ public class EmptyTranslationsTest extends AbstractEventBTests { @Before @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); stringWriter = new StringWriter(); writer = new PrintWriter(stringWriter); diff --git a/de.prob.core.tests/src/de/prob/core/translator/tests/MachineWithVariablesTest.java b/de.prob.core.tests/src/de/prob/core/translator/tests/MachineWithVariablesTest.java index ad6aab405fee0eb88a599d31ab3b1e8e916660f4..ba853698cc86c70bf246140f9ee2351048be450a 100644 --- a/de.prob.core.tests/src/de/prob/core/translator/tests/MachineWithVariablesTest.java +++ b/de.prob.core.tests/src/de/prob/core/translator/tests/MachineWithVariablesTest.java @@ -13,13 +13,15 @@ import org.junit.Test; import de.prob.core.translator.TranslationFailedException; import de.prob.eventb.translator.TranslatorFactory; +import static org.junit.Assert.assertEquals; + public class MachineWithVariablesTest extends AbstractEventBTests { private StringWriter stringWriter; private PrintWriter writer; @Before @Override - protected void setUp() throws Exception { + public void setUp() throws Exception { super.setUp(); stringWriter = new StringWriter(); writer = new PrintWriter(stringWriter);