aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorMathias Kinzler <mathias.kinzler@sap.com>2010-12-20 16:54:41 +0100
committerMathias Kinzler <mathias.kinzler@sap.com>2010-12-20 16:54:41 +0100
commitf91ee9afcc56d93829e6e57efb6f9db5c9fa70be (patch)
tree34c8b4cd3fe6a552f7586bc21342484abf7cb8e9 /org.eclipse.jgit.test
parentbefeff16e7744fee1b439d269f51eb42c8f2fb93 (diff)
downloadjgit-f91ee9afcc56d93829e6e57efb6f9db5c9fa70be.tar.gz
jgit-f91ee9afcc56d93829e6e57efb6f9db5c9fa70be.zip
Fix CheckoutCommandTest
Change-Id: Ieacae01de20d7729ef34e6e6a1523fbaf9db41a8 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
index 1166464d5e..2abd9d84e7 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
@@ -128,8 +128,9 @@ public class CheckoutCommandTest extends RepositoryTestCase {
}
}
- public void testCheckoutWithConflict() {
+ public void testCheckoutWithConflict() throws IOException {
CheckoutCommand co = git.checkout();
+ File trashFile = writeTrashFile("Test.txt", "Another change");
try {
writeTrashFile("Test.txt", "Another change");
assertEquals(Status.NOT_TRIED, co.getResult().getStatus());
@@ -137,7 +138,7 @@ public class CheckoutCommandTest extends RepositoryTestCase {
fail("Should have failed");
} catch (Exception e) {
assertEquals(Status.CONFLICTS, co.getResult().getStatus());
- assertTrue(co.getResult().getConflictList().contains("Test.txt"));
+ assertTrue(co.getResult().getConflictList().contains(trashFile));
}
}
@@ -170,7 +171,7 @@ public class CheckoutCommandTest extends RepositoryTestCase {
co.setName("test").call();
assertTrue(testFile.exists());
assertEquals(Status.NONDELETED, co.getResult().getStatus());
- assertTrue(co.getResult().getUndeletedList().contains("Test.txt"));
+ assertTrue(co.getResult().getUndeletedList().contains(testFile));
} finally {
fis.close();
}