Skip to content

Commit

Permalink
Bug 559888 - Move test resources to JUnit 4
Browse files Browse the repository at this point in the history
Convert suites to JUnit 4 style.

Change-Id: Icc683a4dfe799e4779ad4555296efbd472364589
Signed-off-by: Alexander Kurtakov <[email protected]>
  • Loading branch information
akurtakov committed Feb 7, 2020
1 parent fa6d36b commit 31a4b42
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 389 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,14 @@
*******************************************************************************/
package org.eclipse.core.tests.filesystem;

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

/**
* Class for collecting all test classes that deal with the file system API.
*/
public class AllTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(CreateDirectoryTest.class);
suite.addTestSuite(DeleteTest.class);
suite.addTestSuite(EFSTest.class);
suite.addTestSuite(FileCacheTest.class);
suite.addTestSuite(FileStoreTest.class);
suite.addTestSuite(OpenOutputStreamTest.class);
suite.addTestSuite(PutInfoTest.class);
suite.addTestSuite(SymlinkTest.class);
suite.addTestSuite(URIUtilTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ CreateDirectoryTest.class, DeleteTest.class, EFSTest.class, FileCacheTest.class,
FileStoreTest.class, OpenOutputStreamTest.class, PutInfoTest.class, SymlinkTest.class, URIUtilTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,16 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.alias;

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

/**
* Class for collecting all test classes that deal with alias support. An alias
* Class for collecting all test classes that deal with alias support. An alias
* is a resource in the workspace that has the same file system location as
* another resource in the workspace. When a resource changes in a way that
* another resource in the workspace. When a resource changes in a way that
* affects the contents on disk, all aliases need to be updated.
*/
public class AllTests extends TestCase {
public AllTests() {
super(null);
}

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

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(BasicAliasTest.class);
suite.addTestSuite(SyncAliasTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ BasicAliasTest.class, SyncAliasTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,14 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.builders;

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

public class AllTests extends TestCase {
@RunWith(Suite.class)
@Suite.SuiteClasses({ BuilderCycleTest.class, BuilderEventTest.class, BuilderNatureTest.class, BuilderTest.class,
BuildDeltaVerificationTest.class, CustomBuildTriggerTest.class, EmptyDeltaTest.class,
MultiProjectBuildTest.class, RelaxedSchedRuleBuilderTest.class, BuildConfigurationsTest.class,
BuildContextTest.class, ParallelBuildChainTest.class, ComputeProjectOrderTest.class })
public class AllTests {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(BuilderCycleTest.class);
suite.addTestSuite(BuilderEventTest.class);
suite.addTestSuite(BuilderNatureTest.class);
suite.addTestSuite(BuilderTest.class);
suite.addTestSuite(BuildDeltaVerificationTest.class);
suite.addTestSuite(CustomBuildTriggerTest.class);
suite.addTestSuite(EmptyDeltaTest.class);
suite.addTestSuite(MultiProjectBuildTest.class);
suite.addTestSuite(RelaxedSchedRuleBuilderTest.class);
suite.addTestSuite(BuildConfigurationsTest.class);
suite.addTestSuite(BuildContextTest.class);
suite.addTestSuite(ParallelBuildChainTest.class);
suite.addTest(new JUnit4TestAdapter(ComputeProjectOrderTest.class));
return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.dtree;

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

public class AllTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(DataTreeTest.class);
suite.addTestSuite(DeltaDataTreeTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ DataTreeTest.class, DeltaDataTreeTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.events;

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

public class AllTests extends TestCase {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(BuildProjectFromMultipleJobsTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ BuildProjectFromMultipleJobsTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,15 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.localstore;

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

public class AllTests extends TestCase {
@RunWith(Suite.class)
@Suite.SuiteClasses({ BlobStoreTest.class, BucketTreeTests.class, CaseSensitivityTest.class, CopyTest.class,
DeleteTest.class, FileSystemResourceManagerTest.class, HistoryBucketTest.class, HistoryStoreTest.class,
LocalSyncTest.class, MoveTest.class, PrefixPoolTest.class, RefreshLocalTest.class,
SafeChunkyInputOutputStreamTest.class, SafeFileInputOutputStreamTest.class, SymlinkResourceTest.class,
UnifiedTreeTest.class })
public class AllTests {

public AllTests() {
super(null);
}

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

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(BlobStoreTest.class);
suite.addTestSuite(BucketTreeTests.class);
suite.addTestSuite(CaseSensitivityTest.class);
suite.addTestSuite(CopyTest.class);
suite.addTestSuite(DeleteTest.class);
suite.addTestSuite(FileSystemResourceManagerTest.class);
suite.addTestSuite(HistoryBucketTest.class);
suite.addTestSuite(HistoryStoreTest.class);
suite.addTestSuite(LocalSyncTest.class);
suite.addTestSuite(MoveTest.class);
suite.addTestSuite(PrefixPoolTest.class);
suite.addTestSuite(RefreshLocalTest.class);
suite.addTestSuite(SafeChunkyInputOutputStreamTest.class);
suite.addTestSuite(SafeFileInputOutputStreamTest.class);
suite.addTestSuite(SymlinkResourceTest.class);
suite.addTestSuite(UnifiedTreeTest.class);
return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.mapping;

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

/**
* Suite containing all tests in the org.eclipse.core.tests.internal.mapping package.
* Suite containing all tests in the org.eclipse.core.tests.internal.mapping
* package.
*
* @since 3.2
*/
public class AllTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(ChangeValidationTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ ChangeValidationTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.properties;

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

public class AllTests extends TestCase {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(PropertyManagerTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ PropertyManagerTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.propertytester;

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

@RunWith(Suite.class)
@Suite.SuiteClasses({ FilePropertyTesterTest.class })
public class AllTests extends TestCase {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(FilePropertyTesterTest.class);
return suite;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,17 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.resources;

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

/**
* The suite method for this class contains test suites for all automated tests in
* this test package.
* The suite method for this class contains test suites for all automated tests
* in this test package.
*/
public class AllTests extends TestCase {
/**
* Returns the test suite called by AutomatedTests and by JUnit test runners.
*/
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(ModelObjectReaderWriterTest.class);
suite.addTestSuite(ProjectPreferencesTest.class);
suite.addTestSuite(ResourceInfoTest.class);
suite.addTestSuite(WorkspaceConcurrencyTest.class);
suite.addTestSuite(WorkspacePreferencesTest.class);
suite.addTestSuite(ProjectReferencesTest.class);
suite.addTestSuite(ProjectDynamicReferencesTest.class);
suite.addTestSuite(ProjectBuildConfigsTest.class);
suite.addTestSuite(Bug544975Test.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ ModelObjectReaderWriterTest.class, ProjectPreferencesTest.class,
ResourceInfoTest.class,
WorkspaceConcurrencyTest.class, WorkspacePreferencesTest.class, ProjectReferencesTest.class,
ProjectDynamicReferencesTest.class, ProjectBuildConfigsTest.class, Bug544975Test.class, })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.utils;

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

public class AllTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(ObjectMapTest.class);
suite.addTestSuite(CacheTest.class);
suite.addTestSuite(FileUtilTest.class);
return suite;
}
@RunWith(Suite.class)
@Suite.SuiteClasses({ ObjectMapTest.class, CacheTest.class, FileUtilTest.class })
public class AllTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.watson;

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

public class AllTests extends TestCase {
@RunWith(Suite.class)
@Suite.SuiteClasses({
DeltaChainFlatteningTest.class, DeltaFlatteningTest.class, ElementTreeDeltaChainTest.class,
ElementTreeIteratorTest.class, ElementTreeHasChangesTest.class, TreeFlatteningTest.class
})
public class AllTests {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(DeltaChainFlatteningTest.class);
suite.addTestSuite(DeltaFlatteningTest.class);
suite.addTestSuite(ElementTreeDeltaChainTest.class);
suite.addTestSuite(ElementTreeIteratorTest.class);
suite.addTestSuite(ElementTreeHasChangesTest.class);
suite.addTestSuite(TreeFlatteningTest.class);
return suite;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,20 @@
*******************************************************************************/
package org.eclipse.core.tests.resources;

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

public class AllTests extends TestCase {
@RunWith(Suite.class)
@Suite.SuiteClasses({ CharsetTest.class, ContentDescriptionManagerTest.class, FilteredResourceTest.class,
HiddenResourceTest.class, VirtualFolderTest.class, IFileTest.class, IFolderTest.class,
IPathVariableTest.class,
IProjectDescriptionTest.class, IProjectTest.class, IResourceChangeEventTest.class,
IResourceChangeListenerTest.class, IResourceDeltaTest.class, IResourceTest.class, ISynchronizerTest.class,
IWorkspaceRootTest.class, IWorkspaceTest.class, LinkedResourceTest.class,
LinkedResourceWithPathVariableTest.class, LinkedResourceSyncMoveAndCopyTest.class, MarkerSetTest.class,
MarkerTest.class, NatureTest.class, NonLocalLinkedResourceTest.class, ProjectOrderTest.class,
ProjectScopeTest.class, ProjectSnapshotTest.class, ResourceAttributeTest.class, ResourceURLTest.class,
TeamPrivateMemberTest.class, WorkspaceTest.class })
public class AllTests {

public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(CharsetTest.class);
suite.addTestSuite(ContentDescriptionManagerTest.class);
suite.addTestSuite(FilteredResourceTest.class);
suite.addTestSuite(HiddenResourceTest.class);
suite.addTestSuite(VirtualFolderTest.class);
suite.addTestSuite(IFileTest.class);
suite.addTestSuite(IFolderTest.class);
suite.addTestSuite(IPathVariableTest.class);
suite.addTestSuite(IProjectDescriptionTest.class);
suite.addTestSuite(IProjectTest.class);
suite.addTestSuite(IResourceChangeEventTest.class);
suite.addTestSuite(IResourceChangeListenerTest.class);
suite.addTestSuite(IResourceDeltaTest.class);
suite.addTestSuite(IResourceTest.class);
suite.addTestSuite(ISynchronizerTest.class);
suite.addTestSuite(IWorkspaceRootTest.class);
suite.addTestSuite(IWorkspaceTest.class);
suite.addTestSuite(LinkedResourceTest.class);
suite.addTestSuite(LinkedResourceWithPathVariableTest.class);
suite.addTestSuite(LinkedResourceSyncMoveAndCopyTest.class);
suite.addTestSuite(MarkerSetTest.class);
suite.addTestSuite(MarkerTest.class);
suite.addTestSuite(NatureTest.class);
suite.addTestSuite(NonLocalLinkedResourceTest.class);
suite.addTestSuite(ProjectOrderTest.class);
suite.addTestSuite(ProjectScopeTest.class);
suite.addTestSuite(ProjectSnapshotTest.class);
suite.addTestSuite(ResourceAttributeTest.class);
suite.addTestSuite(ResourceURLTest.class);
suite.addTestSuite(TeamPrivateMemberTest.class);
suite.addTestSuite(WorkspaceTest.class);
return suite;
}
}
Loading

0 comments on commit 31a4b42

Please sign in to comment.