Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2007, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2007, 2010 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 15-20
Link Here
|
15 |
import junit.extensions.TestSetup; |
15 |
import junit.extensions.TestSetup; |
16 |
import junit.framework.Test; |
16 |
import junit.framework.Test; |
17 |
|
17 |
|
|
|
18 |
import org.eclipse.jdt.junit.JUnitCore; |
18 |
import org.eclipse.jdt.testplugin.JavaProjectHelper; |
19 |
import org.eclipse.jdt.testplugin.JavaProjectHelper; |
19 |
import org.eclipse.jdt.testplugin.JavaTestPlugin; |
20 |
import org.eclipse.jdt.testplugin.JavaTestPlugin; |
20 |
|
21 |
|
Lines 25-32
Link Here
|
25 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
26 |
import org.eclipse.jdt.core.IPackageFragmentRoot; |
26 |
import org.eclipse.jdt.core.JavaCore; |
27 |
import org.eclipse.jdt.core.JavaCore; |
27 |
|
28 |
|
28 |
import org.eclipse.jdt.internal.junit.buildpath.JUnitContainerInitializer; |
|
|
29 |
|
30 |
public class JUnitWorkspaceTestSetup extends TestSetup { |
29 |
public class JUnitWorkspaceTestSetup extends TestSetup { |
31 |
|
30 |
|
32 |
public static final String WORKSPACE_PATH= "testresources/JUnitWorkspace/"; |
31 |
public static final String WORKSPACE_PATH= "testresources/JUnitWorkspace/"; |
Lines 60-72
Link Here
|
60 |
if (fJUnit4) { |
59 |
if (fJUnit4) { |
61 |
fgProject= JavaProjectHelper.createJavaProject(PROJECT_NAME_4, "bin"); |
60 |
fgProject= JavaProjectHelper.createJavaProject(PROJECT_NAME_4, "bin"); |
62 |
JavaProjectHelper.addRTJar(fgProject); |
61 |
JavaProjectHelper.addRTJar(fgProject); |
63 |
IClasspathEntry cpe= JavaCore.newContainerEntry(JUnitContainerInitializer.JUNIT4_PATH); |
62 |
IClasspathEntry cpe= JavaCore.newContainerEntry(JUnitCore.JUNIT4_CONTAINER_PATH); |
64 |
JavaProjectHelper.addToClasspath(fgProject, cpe); |
63 |
JavaProjectHelper.addToClasspath(fgProject, cpe); |
65 |
|
64 |
|
66 |
} else { |
65 |
} else { |
67 |
fgProject= JavaProjectHelper.createJavaProject(PROJECT_NAME_3, "bin"); |
66 |
fgProject= JavaProjectHelper.createJavaProject(PROJECT_NAME_3, "bin"); |
68 |
JavaProjectHelper.addRTJar13(fgProject); |
67 |
JavaProjectHelper.addRTJar13(fgProject); |
69 |
IClasspathEntry cpe= JavaCore.newContainerEntry(JUnitContainerInitializer.JUNIT3_PATH); |
68 |
IClasspathEntry cpe= JavaCore.newContainerEntry(JUnitCore.JUNIT3_CONTAINER_PATH); |
70 |
JavaProjectHelper.addToClasspath(fgProject, cpe); |
69 |
JavaProjectHelper.addToClasspath(fgProject, cpe); |
71 |
} |
70 |
} |
72 |
fgRoot= JavaProjectHelper.addSourceContainer(fgProject, SRC_NAME); |
71 |
fgRoot= JavaProjectHelper.addSourceContainer(fgProject, SRC_NAME); |