Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-06-07 20:05:39 +0000
committerMichael Valenta2002-06-07 20:05:39 +0000
commite0f45b506b4fcbd654b9d3f5f6e7c23c4d1df39b (patch)
tree6eda3869fddac04804868665aaa1b85535f35dfb /tests/org.eclipse.team.tests.core
parente2842965a9421d92715ae31883b74a62e8dd0059 (diff)
downloadeclipse.platform.team-e0f45b506b4fcbd654b9d3f5f6e7c23c4d1df39b.tar.gz
eclipse.platform.team-e0f45b506b4fcbd654b9d3f5f6e7c23c4d1df39b.tar.xz
eclipse.platform.team-e0f45b506b4fcbd654b9d3f5f6e7c23c4d1df39b.zip
18912: TM: Add TargetProvider#hasBase()
Diffstat (limited to 'tests/org.eclipse.team.tests.core')
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java4
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java25
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java18
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java6
4 files changed, 31 insertions, 22 deletions
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java
index 3eef2b1f8..43f096875 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java
@@ -70,7 +70,7 @@ public class RemoteResourceTests extends TeamTest {
IProject project = createAndPut("getname", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
TargetProvider target = getProvider(project);
IRemoteResource remote = target.getRemoteResourceFor(project.getFile("file1.txt"));
- InputStream jin = remote.getContents(null);
+ InputStream jin = remote.getContents(DEFAULT_MONITOR);
try {
while (jin.available() > 0) {
jin.read();
@@ -85,7 +85,7 @@ public class RemoteResourceTests extends TeamTest {
IProject project = createAndPut("getname", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
TargetProvider target = getProvider(project);
IRemoteResource remote = target.getRemoteResource();
- IRemoteResource[] altResources = remote.members(null);
+ IRemoteResource[] altResources = remote.members(DEFAULT_MONITOR);
for (int i = 0; i < altResources.length; i++) {
assertEquals(altResources[i], project.findMember(altResources[i].getName()));
}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java
index 5de7a53c8..ea3779427 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java
@@ -12,17 +12,27 @@ package org.eclipse.team.tests.core;
import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.lang.reflect.Member;
-import junit.framework.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.*;
+import org.eclipse.team.core.sync.ILocalSyncElement;
+import org.eclipse.team.core.sync.IRemoteSyncElement;
+import org.eclipse.team.core.sync.RemoteSyncElement;
import org.eclipse.team.core.target.TargetManager;
import org.eclipse.team.core.target.TargetProvider;
import org.eclipse.team.internal.core.target.UrlUtil;
-import org.eclipse.team.internal.ui.target.RemoteTargetSyncElement;
public class SyncElementTest extends TeamTest {
/*
@@ -103,8 +113,7 @@ public class SyncElementTest extends TeamTest {
}
IRemoteSyncElement getRemoteSyncTree(IProject project, IProgressMonitor monitor) throws TeamException {
- IRemoteSyncElement result = new RemoteTargetSyncElement(project,getProvider(project).getRemoteResource());
- return result;
+ return getProvider(project).getRemoteSyncElement(project);
}
protected IProject checkoutCopy(IProject project, String postfix) throws CoreException,TeamException {
TargetProvider provider = getProvider(project);
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java
index 46840a73e..951f63e92 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java
@@ -75,14 +75,14 @@ public class TargetProviderTests extends TeamTest {
IProject project = getUniqueTestProject("get");
IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
TargetProvider target = createProvider(project);
- target.put(resources, null);
+ target.put(resources, DEFAULT_MONITOR);
assertLocalEqualsRemote(project);
// test get on a new project
- project.delete(true, true, null);
- project.create(null);
- project.open(null);
+ project.delete(true, true, DEFAULT_MONITOR);
+ project.create(DEFAULT_MONITOR);
+ project.open(DEFAULT_MONITOR);
target = createProvider(project);
- target.get(new IResource[] { project }, null);
+ target.get(new IResource[] { project }, DEFAULT_MONITOR);
assertLocalEqualsRemote(project);
}
/**
@@ -97,10 +97,10 @@ public class TargetProviderTests extends TeamTest {
for (int i = 0; i < resources.length; i++) {
assertTrue(target.canPut(resources[i]));
}
- target.put(resources, null);
- project.delete(true, true, null);
- project.create(null);
- project.open(null);
+ target.put(resources, DEFAULT_MONITOR);
+ project.delete(true, true, DEFAULT_MONITOR);
+ project.create(DEFAULT_MONITOR);
+ project.open(DEFAULT_MONITOR);
target = createProvider(project);
for (int i = 0; i < resources.length; i++) {
assertTrue(target.canGet(resources[i]));
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
index 28dec26c6..f7478e93f 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
@@ -198,9 +198,9 @@ public class TeamTest extends EclipseWorkspaceTest {
// Ignore .project file
if (container2.getName().equals(".project"))
return;
- assertTrue(compareContent(container1.getContents(null), ((IFile) container2).getContents()));
+ assertTrue(compareContent(container1.getContents(DEFAULT_MONITOR), ((IFile) container2).getContents()));
} else {
- IRemoteResource[] remoteResources = container1.members(null);
+ IRemoteResource[] remoteResources = container1.members(DEFAULT_MONITOR);
IResource[] localResources = ((IFolder) container2).members();
for (int i = 0; i < localResources.length; i++) {
assertEquals(remoteResources[i], localResources[i]);
@@ -211,7 +211,7 @@ public class TeamTest extends EclipseWorkspaceTest {
IProject project = getUniqueTestProject(projectPrefix);
IResource[] resources = buildResources(project, resourceNames, false);
TargetProvider target = createProvider(project);
- target.put(resources, null);
+ target.put(resources, DEFAULT_MONITOR);
return project;
}

Back to the top