aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}