diff options
author | Michael Valenta | 2005-10-17 21:25:39 +0000 |
---|---|---|
committer | Michael Valenta | 2005-10-17 21:25:39 +0000 |
commit | 049d3cccf3b009bacdc3418863247b268b5951ee (patch) | |
tree | 4bf249e54a17234cd1f9487145c7e6c02f5e7ea6 /tests | |
parent | ee73032920df301941eaba69a5f098325128f63a (diff) | |
download | eclipse.platform.team-049d3cccf3b009bacdc3418863247b268b5951ee.tar.gz eclipse.platform.team-049d3cccf3b009bacdc3418863247b268b5951ee.tar.xz eclipse.platform.team-049d3cccf3b009bacdc3418863247b268b5951ee.zip |
Added tests for operation to cache the base contents
Diffstat (limited to 'tests')
-rw-r--r-- | tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java index c84747ac0..90baf553a 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java @@ -548,14 +548,14 @@ public class ResourceMapperTests extends EclipseTest { IProject copy = checkoutCopy(project, "-copy"); // First, make some local changes and then cache the bases - setContentsAndEnsureModified(project.getFile("changed.txt")); + setContentsAndEnsureModified(project.getFile("changed.txt"), "Uncomited text"); setContentsAndEnsureModified(project.getFile("folder1/b.txt")); project.getFile("deleted.txt").delete(false, true, null); cacheBase(project, true /* cache for outgoing and conflicting */); cacheBase(project, false /* cache for conflicting only*/); // Next, retry after releasing some changes (to ensure proper contents are fetched) - setContentsAndEnsureModified(copy.getFile("changed.txt")); + setContentsAndEnsureModified(copy.getFile("changed.txt"), "Text comited from the copy"); commitProject(copy); cacheBase(project, true /* cache for outgoing and conflicting */); cacheBase(project, false /* cache for conflicting only */); @@ -585,6 +585,9 @@ public class ResourceMapperTests extends EclipseTest { IResourceVariant remote = info.getRemote(); if (remote != null) { InputStream baseIn = base.getStorage(DEFAULT_MONITOR).getContents(); + if (baseIn == null) { + fail(NLS.bind("Base was not fetched for for {0}", new String[] {info.getLocal().getFullPath().toString()})); + } InputStream remoteIn = remote.getStorage(DEFAULT_MONITOR).getContents(); if (compareContent(baseIn, remoteIn)) { fail(NLS.bind("The remote was fetched instead of the base for {0}", new String[] {info.getLocal().getFullPath().toString()})); |