Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/ResourceUtilPathTest.java30
1 files changed, 24 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/ResourceUtilPathTest.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/ResourceUtilPathTest.java
index 50ddb34b5..d56ac3ea2 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/ResourceUtilPathTest.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/unit/ResourceUtilPathTest.java
@@ -41,7 +41,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
// But it doesn't start with it (repository name is the first segment)
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
// And it contains the commit's id at the end
- assertTrue(storagePath.endsWith(origin.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + origin.getId().abbreviate(7) + " - full id was " + origin.getId(),
+ storagePath.endsWith(origin.getId().abbreviate(7).name()));
// while we want an actually useable path
String fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
@@ -53,7 +56,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
storagePath = storage.getFullPath().toOSString();
assertTrue(storagePath.contains(workspaceRelativePath));
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
- assertTrue(storagePath.endsWith(branchTip.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + branchTip.getId().abbreviate(7) + " - full id was " + branchTip.getId(),
+ storagePath.endsWith(branchTip.getId().abbreviate(7).name()));
fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
assertEquals(workspaceRelativePath, fixedPath);
@@ -64,7 +70,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
storagePath = storage.getFullPath().toOSString();
assertTrue(storagePath.contains(workspaceRelativePath));
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
- assertTrue(storagePath.endsWith(masterTip.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + masterTip.getId().abbreviate(7) + " - full id was " + masterTip.getId(),
+ storagePath.endsWith(masterTip.getId().abbreviate(7).name()));
fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
assertEquals(workspaceRelativePath, fixedPath);
@@ -93,7 +102,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
// But it doesn't start with it (repository name is the first segment)
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
// And it contains the commit's id at the end
- assertTrue(storagePath.endsWith(origin.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + origin.getId().abbreviate(7) + " - full id was " + origin.getId(),
+ storagePath.endsWith(origin.getId().abbreviate(7).name()));
// while we want an actually useable path
String fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
@@ -105,7 +117,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
storagePath = storage.getFullPath().toOSString();
assertTrue(storagePath.contains(workspaceRelativePath));
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
- assertTrue(storagePath.endsWith(branchTip.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + branchTip.getId().abbreviate(7) + " - full id was " + branchTip.getId(),
+ storagePath.endsWith(branchTip.getId().abbreviate(7).name()));
fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
assertEquals(workspaceRelativePath, fixedPath);
@@ -116,7 +131,10 @@ public class ResourceUtilPathTest extends AbstractURITest {
storagePath = storage.getFullPath().toOSString();
assertTrue(storagePath.contains(workspaceRelativePath));
assertFalse(storagePath.startsWith(iFile1.getFullPath().toOSString()));
- assertTrue(storagePath.endsWith(masterTip.getId().abbreviate(6).name()));
+ assertTrue(
+ storagePath + " does not end with the expected abbreviated commit id: "
+ + masterTip.getId().abbreviate(7) + " - full id was " + masterTip.getId(),
+ storagePath.endsWith(masterTip.getId().abbreviate(7).name()));
fixedPath = ResourceUtil.getFixedPath(storage).toOSString();
assertEquals(workspaceRelativePath, fixedPath);

Back to the top