Skip to content

Commit

Permalink
Move only remaining test from pde.ui.tests.smartimport into pde.ui.tests
Browse files Browse the repository at this point in the history
And delete the now empty o.e.pde.ui.tests.smartimport.
  • Loading branch information
HannesWell committed Sep 16, 2023
1 parent 6dc47b2 commit b1aa820
Show file tree
Hide file tree
Showing 24 changed files with 31 additions and 563 deletions.
11 changes: 0 additions & 11 deletions ui/org.eclipse.pde.ui.tests.smartimport/.classpath

This file was deleted.

4 changes: 0 additions & 4 deletions ui/org.eclipse.pde.ui.tests.smartimport/.options

This file was deleted.

28 changes: 0 additions & 28 deletions ui/org.eclipse.pde.ui.tests.smartimport/.project

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions ui/org.eclipse.pde.ui.tests.smartimport/META-INF/MANIFEST.MF

This file was deleted.

3 changes: 0 additions & 3 deletions ui/org.eclipse.pde.ui.tests.smartimport/META-INF/p2.inf

This file was deleted.

22 changes: 0 additions & 22 deletions ui/org.eclipse.pde.ui.tests.smartimport/about.html

This file was deleted.

19 changes: 0 additions & 19 deletions ui/org.eclipse.pde.ui.tests.smartimport/build.properties

This file was deleted.

49 changes: 0 additions & 49 deletions ui/org.eclipse.pde.ui.tests.smartimport/test.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.eclipse.pde.ui.tests.target.AllTargetMinimalTests;
import org.eclipse.pde.ui.tests.views.log.AllLogViewTests;
import org.eclipse.pde.ui.tests.wizards.AllNewProjectMinimalTests;
import org.eclipse.ui.tests.smartimport.ProjectSmartImportTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
Expand All @@ -43,19 +44,29 @@
*/

@RunWith(Suite.class)
@SuiteClasses({ AllTargetMinimalTests.class, AllNewProjectMinimalTests.class, AllPreferenceTests.class,
// AllImportTests.class,
AllBundleModelTests.class, AllXMLModelTests.class, AllValidatorTests.class, AllNLSTests.class,
AllPDERuntimeTests.class,
// ExportBundleTests.class,
AllLauncherTests.class, AllLogViewTests.class, ProjectCreationTests.class, BundleRootTests.class,
PluginRegistryTestsMinimal.class, ClasspathResolverTest.class, PDESchemaHelperTest.class,
@SuiteClasses({ AllTargetMinimalTests.class, //
AllNewProjectMinimalTests.class, //
AllPreferenceTests.class, //
// AllImportTests.class, //
AllBundleModelTests.class, //
AllXMLModelTests.class, //
AllValidatorTests.class, //
AllNLSTests.class, //
AllPDERuntimeTests.class, //
// ExportBundleTests.class, //
AllLauncherTests.class, //
AllLogViewTests.class, //
ProjectCreationTests.class, //
BundleRootTests.class, //
PluginRegistryTestsMinimal.class, //
ClasspathResolverTest.class, //
PDESchemaHelperTest.class, //
DynamicPluginProjectReferencesTest.class,
// ClasspathContributorTest.class
ClasspathResolutionTest.class,
BundleErrorReporterTest.class,
AllPDECoreTests.class
})
// ClasspathContributorTest.class //
ClasspathResolutionTest.class, //
BundleErrorReporterTest.class, //
AllPDECoreTests.class, //
ProjectSmartImportTest.class })
public class AllPDEMinimalTests {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 Red Hat, Inc. and others.
* Copyright (c) 2018, 2023 Red Hat, Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -46,15 +46,15 @@
import org.junit.runners.Parameterized.Parameters;

@RunWith(Parameterized.class)
public class ProjectTestTemplate {
public class ProjectSmartImportTest {

@Parameters(name = "{0}")
public static Object[][] data() {
return new Object[][] { //
{ "JavaEclipseProject", List.of("org.eclipse.jdt.core.javanature") }, //
{ "FeatureProject", List.of("org.eclipse.pde.FeatureNature") }, //
{ "PlainEclipseProject", List.of() }, //
{ "PlainJavaProject", List.of("org.eclipse.jdt.core.javanature") }, //
{ "JavaEclipseProject", List.of("org.eclipse.jdt.core.javanature") }, //
{ "FeatureProject", List.of("org.eclipse.pde.FeatureNature") }, //
{ "PlainEclipseProject", List.of() }, //
{ "PlainJavaProject", List.of("org.eclipse.jdt.core.javanature") }, //
};
}

Expand All @@ -70,7 +70,7 @@ public static Object[][] data() {
@BeforeClass
public static void setupClass() throws IOException, CoreException {
// Copy imported projects to temp-directory to not pollute this project
Path source = Path.of("resources").toRealPath();
Path source = Path.of("tests/smartImport").toRealPath();
Path target = workingDirectory.getRoot().toPath();
try (Stream<Path> files = Files.walk(source).filter(Files::isRegularFile)) {
for (Path file : (Iterable<Path>) files::iterator) {
Expand All @@ -94,7 +94,6 @@ private static Path getErrorLogFile() {
}

@Test
@SuppressWarnings("restriction")
public void testImport() throws CoreException, InterruptedException {
File projectPath = new File(workingDirectory.getRoot(), projectName);

Expand Down Expand Up @@ -125,7 +124,7 @@ private void checkProblemsView(IProject project) throws CoreException {
}).toList();
assertTrue(
"There should be no errors in imported project: " + System.lineSeparator() + errorMarkers.stream()
.map(String::valueOf).collect(Collectors.joining(System.lineSeparator())),
.map(String::valueOf).collect(Collectors.joining(System.lineSeparator())),
errorMarkers.isEmpty());

}
Expand Down
1 change: 0 additions & 1 deletion ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<module>org.eclipse.pde.ui</module>
<module>org.eclipse.pde.ui.templates</module>
<module>org.eclipse.pde.ui.tests</module>
<module>org.eclipse.pde.ui.tests.smartimport</module>
<module>org.eclipse.pde.spy.core</module>
<module>org.eclipse.pde.spy.bundle</module>
<module>org.eclipse.pde.spy.event</module>
Expand Down

0 comments on commit b1aa820

Please sign in to comment.