Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate test suites in org.eclipse.core.tests.resources to JUnit 5 #903 #1334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Require-Bundle: org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.pde.junit.runtime;bundle-version="3.5.0"
Import-Package: org.assertj.core.api,
org.junit.jupiter.api,
org.junit.platform.suite.api,
org.mockito
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@
*******************************************************************************/
package org.eclipse.core.tests.filesystem;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* Class for collecting all test classes that deal with the file system API.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ CreateDirectoryTest.class, DeleteTest.class, EFSTest.class, FileCacheTest.class,
FileStoreTest.class, OpenOutputStreamTest.class, PutInfoTest.class, SymlinkTest.class, URIUtilTest.class })
@Suite
@SelectClasses({ CreateDirectoryTest.class, //
DeleteTest.class, //
EFSTest.class, //
FileCacheTest.class, //
FileStoreTest.class, //
OpenOutputStreamTest.class, //
PutInfoTest.class, //
SymlinkTest.class, //
URIUtilTest.class, //
})
public class AllFileSystemTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.alias;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* 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
* affects the contents on disk, all aliases need to be updated.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ BasicAliasTest.class, SyncAliasTest.class })
@Suite
@SelectClasses({ //
BasicAliasTest.class, //
SyncAliasTest.class, //
})
public class AllAliasTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.builders;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ //
@Suite
@SelectClasses({ //
AutoBuildJobTest.class, //
BuildConfigurationsTest.class, //
BuildContextTest.class, //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.dtree;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ DeltaDataTreeTest.class })
@Suite
@SelectClasses({ //
DeltaDataTreeTest.class, //
})
public class AllDtreeTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.events;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ BuildProjectFromMultipleJobsTest.class })
@Suite
@SelectClasses({ //
BuildProjectFromMultipleJobsTest.class, //
})
public class AllEventsTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.localstore;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ //
@Suite
@SelectClasses({ //
BlobStoreTest.class, //
BucketTreeTests.class, //
CaseSensitivityTest.class, //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.mapping;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* Suite containing all tests in the org.eclipse.core.tests.internal.mapping
* package.
*
* @since 3.2
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
ChangeValidationTest.class,
TestProjectDeletion.class
})
@Suite
@SelectClasses({ //
ChangeValidationTest.class, //
TestProjectDeletion.class, //
})
public class AllMappingTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.properties;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)

@Suite.SuiteClasses({ PropertyManagerTest.class })
@Suite
@SelectClasses({ //
PropertyManagerTest.class, //
})
public class AllPropertiesTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.propertytester;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ FilePropertyTesterTest.class })
@Suite
@SelectClasses({ //
FilePropertyTesterTest.class, //
})
public class AllPropertytesterTests {

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

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* The suite method for this class contains test suites for all automated tests
* in this test package.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ //
@Suite
@SelectClasses({ //
Bug544975Test.class, //
ModelObjectReaderWriterTest.class, //
ProjectBuildConfigsTest.class, //
Expand All @@ -31,6 +31,7 @@
ProjectReferencesTest.class, //
ResourceInfoTest.class, //
WorkspaceConcurrencyTest.class, //
WorkspacePreferencesTest.class, })
WorkspacePreferencesTest.class, //
})
public class AllInternalResourcesTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.utils;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ ObjectMapTest.class, CacheTest.class, FileUtilTest.class })
@Suite
@SelectClasses({ //
ObjectMapTest.class, //
CacheTest.class, //
FileUtilTest.class, })
public class AllUtilsTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
*******************************************************************************/
package org.eclipse.core.tests.internal.watson;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({
DeltaChainFlatteningTest.class, DeltaFlatteningTest.class, ElementTreeDeltaChainTest.class,
ElementTreeIteratorTest.class, ElementTreeHasChangesTest.class, TreeFlatteningTest.class
@Suite
@SelectClasses({ //
DeltaChainFlatteningTest.class, //
DeltaFlatteningTest.class, //
ElementTreeDeltaChainTest.class, //
ElementTreeIteratorTest.class, //
ElementTreeHasChangesTest.class, //
TreeFlatteningTest.class, //
})
public class AllWatsonTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
*******************************************************************************/
package org.eclipse.core.tests.resources;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({ //
@Suite
@SelectClasses({ //
CharsetTest.class, //
ContentDescriptionManagerTest.class, //
FilteredResourceTest.class, //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,33 @@
*******************************************************************************/
package org.eclipse.core.tests.resources;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* Runs the sniff tests for the build. All tests listed here should be
* automated.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ org.eclipse.core.tests.filesystem.AllFileSystemTests.class,
org.eclipse.core.tests.internal.alias.AllAliasTests.class, org.eclipse.core.tests.internal.builders.AllBuilderTests.class,
org.eclipse.core.tests.internal.dtree.AllDtreeTests.class,
org.eclipse.core.tests.internal.localstore.AllLocalStoreTests.class,
org.eclipse.core.tests.internal.mapping.AllMappingTests.class,
org.eclipse.core.tests.internal.properties.AllPropertiesTests.class,
org.eclipse.core.tests.internal.propertytester.AllPropertytesterTests.class,
org.eclipse.core.tests.internal.utils.AllUtilsTests.class, org.eclipse.core.tests.internal.watson.AllWatsonTests.class,
org.eclipse.core.tests.resources.AllResourcesTests.class, org.eclipse.core.tests.resources.refresh.AllRefreshTests.class,
org.eclipse.core.tests.resources.regression.AllRegressionTests.class,
org.eclipse.core.tests.resources.usecase.AllUsecaseTests.class,
org.eclipse.core.tests.resources.session.AllSessionTests.class,
org.eclipse.core.tests.resources.content.AllContentTests.class, org.eclipse.core.tests.internal.events.AllEventsTests.class,
org.eclipse.core.tests.internal.resources.AllInternalResourcesTests.class,
@Suite
@SelectClasses({ //
org.eclipse.core.tests.filesystem.AllFileSystemTests.class, //
org.eclipse.core.tests.internal.alias.AllAliasTests.class, //
org.eclipse.core.tests.internal.builders.AllBuilderTests.class, //
org.eclipse.core.tests.internal.dtree.AllDtreeTests.class, //
org.eclipse.core.tests.internal.localstore.AllLocalStoreTests.class, //
org.eclipse.core.tests.internal.mapping.AllMappingTests.class, //
org.eclipse.core.tests.internal.properties.AllPropertiesTests.class, //
org.eclipse.core.tests.internal.propertytester.AllPropertytesterTests.class, //
org.eclipse.core.tests.internal.utils.AllUtilsTests.class, //
org.eclipse.core.tests.internal.watson.AllWatsonTests.class, //
org.eclipse.core.tests.resources.AllResourcesTests.class, //
org.eclipse.core.tests.resources.refresh.AllRefreshTests.class, //
org.eclipse.core.tests.resources.regression.AllRegressionTests.class, //
org.eclipse.core.tests.resources.usecase.AllUsecaseTests.class, //
org.eclipse.core.tests.resources.session.AllSessionTests.class, //
org.eclipse.core.tests.resources.content.AllContentTests.class, //
org.eclipse.core.tests.internal.events.AllEventsTests.class, //
org.eclipse.core.tests.internal.resources.AllInternalResourcesTests.class, //
})
public class AutomatedResourceTests {
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,22 @@
*******************************************************************************/
package org.eclipse.core.tests.resources.content;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* Runs all content type tests
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ IContentTypeManagerTest.class, SpecificContextTest.class, ContentDescriptionTest.class,
XMLContentDescriberTest.class, LazyInputStreamTest.class, LazyReaderTest.class, TestBug94498.class })
@Suite
@SelectClasses({ //
IContentTypeManagerTest.class, //
SpecificContextTest.class, //
ContentDescriptionTest.class, //
XMLContentDescriberTest.class, //
LazyInputStreamTest.class, //
LazyReaderTest.class, //
TestBug94498.class, //
})
public class AllContentTests {

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
*******************************************************************************/
package org.eclipse.core.tests.resources.perf;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
* @since 3.1
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({ //
@Suite
@SelectClasses({ //
BenchCopyFile.class, //
BenchElementTree.class, //
// BenchFileStore.class, // very long running
BenchMiscWorkspace.class, //
BenchWorkspace.class,
BenchWorkspace.class, //
BuilderPerformanceTest.class, //
ConcurrencyPerformanceTest.class, //
ContentDescriptionPerformanceTest.class, //
Expand Down
Loading
Loading