Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2019-07-04 08:42:59 -0400
committerlgoubet2019-07-04 08:56:01 -0400
commit08799582e7174a33f8e58d07e48649f5b388af90 (patch)
treea4b163bd4625072ff7f41641e81b541d9efa98c9
parent23df29bcb7866598f4e249e3da98a52142f62d9b (diff)
downloadorg.eclipse.emf.compare-08799582e7174a33f8e58d07e48649f5b388af90.tar.gz
org.eclipse.emf.compare-08799582e7174a33f8e58d07e48649f5b388af90.tar.xz
org.eclipse.emf.compare-08799582e7174a33f8e58d07e48649f5b388af90.zip
Adapt tests to EGit change of behavior
-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