Skip to content

Commit

Permalink
Migrate test suites in o.e.team.test.core to JUnit 4 #903
Browse files Browse the repository at this point in the history
The test suite in the org.eclipse.team.tests.core project still use
JUnit 3. This change migrates the test suite to JUnit 4.

Contributes to
#903
  • Loading branch information
HeikoKlare committed Dec 12, 2023
1 parent 0c5ee0b commit 040a399
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,19 @@
*******************************************************************************/
package org.eclipse.team.tests.core;

import junit.framework.Test;
import junit.framework.TestSuite;

import org.eclipse.core.tests.resources.ResourceTest;
import org.eclipse.team.tests.core.regression.AllTeamRegressionTests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ //
AllTeamRegressionTests.class, //
RepositoryProviderTests.class, //
StorageMergerTests.class, //
StreamTests.class, //
UserMappingTest.class, //
})
public class AllTeamTests extends ResourceTest {

/**
* Constructor for CVSClientTest.
*/
public AllTeamTests() {
super();
}

/**
* Constructor for CVSClientTest.
*/
public AllTeamTests(String name) {
super(name);
}

public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(RepositoryProviderTests.suite());
suite.addTest(StreamTests.suite());
suite.addTest(StorageMergerTests.suite());
suite.addTest(AllTeamRegressionTests.suite());
suite.addTest(UserMappingTest.suite());
return suite;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,18 @@
*******************************************************************************/
package org.eclipse.team.tests.core;

import junit.framework.Test;
import junit.framework.TestSuite;

import org.eclipse.core.tests.resources.ResourceTest;
import org.eclipse.team.tests.core.mapping.ScopeTests;
import org.eclipse.team.tests.core.mapping.AllTeamMappingTests;
import org.eclipse.team.tests.ui.SaveableCompareEditorInputTest;
import org.eclipse.team.tests.ui.synchronize.AllTeamSynchronizeTests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

public class AllTeamUITests extends ResourceTest {

public AllTeamUITests() {
super();
}

public AllTeamUITests(String name) {
super(name);
}

public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(ScopeTests.suite());
suite.addTest(SaveableCompareEditorInputTest.suite());
return suite;
}
@RunWith(Suite.class)
@SuiteClasses({ //
AllTeamMappingTests.class, //
AllTeamSynchronizeTests.class, //
SaveableCompareEditorInputTest.class, //
})
public class AllTeamUITests {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*******************************************************************************
* Copyright (c) 2023 Vector Informatik GmbH and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.team.tests.core.mapping;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ //
ScopeTests.class, //
})
public class AllTeamMappingTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,14 @@
*******************************************************************************/
package org.eclipse.team.tests.core.regression;

import junit.framework.*;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

public class AllTeamRegressionTests extends TestCase {
public AllTeamRegressionTests() {
super(null);
}

public AllTeamRegressionTests(String name) {
super(name);
}

public static Test suite() {
TestSuite suite = new TestSuite(AllTeamRegressionTests.class.getName());
suite.addTest(Bug_217673.suite());
suite.addTest(DoNotRemoveTest.suite());
return suite;
}
@RunWith(Suite.class)
@SuiteClasses({ //
Bug_217673.class, //
DoNotRemoveTest.class, //
})
public class AllTeamRegressionTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,13 @@
*******************************************************************************/
package org.eclipse.team.tests.ui.synchronize;

import junit.framework.Test;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import org.eclipse.core.tests.resources.ResourceTest;

public class AllTeamSynchronizeTests extends ResourceTest {

public AllTeamSynchronizeTests() {
super();
}

public AllTeamSynchronizeTests(String name) {
super(name);
}

public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(ResourceContentTests.suite());
return suite;
}
@RunWith(Suite.class)
@SuiteClasses({ //
ResourceContentTests.class, //
})
public class AllTeamSynchronizeTests {
}

0 comments on commit 040a399

Please sign in to comment.