diff options
author | Matthias Sohn | 2010-02-17 00:31:50 +0000 |
---|---|---|
committer | Matthias Sohn | 2010-02-19 14:12:18 +0000 |
commit | 8ed301ca1834de6f8a2e5bcfabfc7793a26b49ee (patch) | |
tree | 030d4f30be84a6344308540d64147fba65d9d5ba /org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java | |
parent | 8e5dd91534d9ff876d380c1c77e74aa543f30e93 (diff) | |
download | egit-8ed301ca1834de6f8a2e5bcfabfc7793a26b49ee.tar.gz egit-8ed301ca1834de6f8a2e5bcfabfc7793a26b49ee.tar.xz egit-8ed301ca1834de6f8a2e5bcfabfc7793a26b49ee.zip |
Convert tests to JUnit 4 style
The maven-osgi-test-plugin doesn't find JUnit4 with package dependency to
org.junit;version="[4.3.1,5.0.0)". Hence require bundle org.junit4.
Filed https://issues.sonatype.org/browse/TYCHO-360 for this problem.
Rename T0002_history so that it is detected as test class by
maven-osgi-test-plugin default logic (see [1]).
[1] http://github.com/sonatype/sonatype-tycho/blob/master/tycho-surefire/
maven-osgi-test-plugin/src/main/java/org/codehaus/tycho/osgitest/TestMojo.java
Change-Id: I5466e7e3b8d018c2484bf700334cc03778c9728a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java')
-rw-r--r-- | org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java index 46c3b1ba51..d53b35fcde 100644 --- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java +++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitTestCase.java @@ -10,22 +10,22 @@ package org.eclipse.egit.core.test; import java.io.File; import java.io.IOException; -import org.eclipse.jgit.lib.Constants; - -import junit.framework.TestCase; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jgit.junit.MockSystemReader; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.util.SystemReader; +import org.junit.After; +import org.junit.Before; -public abstract class GitTestCase extends TestCase { +public abstract class GitTestCase { protected TestProject project; protected File gitDir; - protected void setUp() throws Exception { - super.setUp(); + @Before + public void setUp() throws Exception { ((MockSystemReader) SystemReader.getInstance()).setProperty( Constants.GIT_CEILING_DIRECTORIES_KEY, ResourcesPlugin .getWorkspace().getRoot().getLocation().toFile() @@ -36,8 +36,8 @@ public abstract class GitTestCase extends TestCase { rmrf(gitDir); } - protected void tearDown() throws Exception { - super.tearDown(); + @After + public void tearDown() throws Exception { project.dispose(); rmrf(gitDir); } |