| package org.eclipse.team.tests.core; |
| |
| import org.eclipse.core.resources.IProject; |
| import org.eclipse.core.runtime.CoreException; |
| import org.eclipse.core.runtime.IStatus; |
| import org.eclipse.core.runtime.Status; |
| import org.eclipse.core.tests.harness.EclipseWorkspaceTest; |
| |
| public class TeamTest extends EclipseWorkspaceTest { |
| public TeamTest() { |
| super(); |
| } |
| public TeamTest(String name) { |
| super(name); |
| } |
| |
| protected IProject getNamedTestProject(String name) throws CoreException { |
| IProject target = getWorkspace().getRoot().getProject(name); |
| if (!target.exists()) { |
| target.create(null); |
| target.open(null); |
| } |
| assertExistsInFileSystem(target); |
| return target; |
| } |
| |
| protected IProject getUniqueTestProject(String prefix) throws CoreException { |
| // manage and share with the default stream create by this class |
| return getNamedTestProject(prefix + "-" + Long.toString(System.currentTimeMillis())); |
| } |
| |
| protected IStatus getTeamTestStatus(int severity) { |
| return new Status(severity, "org.eclipse.team.tests.core", 0, "team status", null); |
| } |
| } |