summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMathias Kinzler2010-12-20 10:54:41 (EST)
committer Mathias Kinzler2010-12-20 10:54:41 (EST)
commitf91ee9afcc56d93829e6e57efb6f9db5c9fa70be (patch)
tree34c8b4cd3fe6a552f7586bc21342484abf7cb8e9
parentbefeff16e7744fee1b439d269f51eb42c8f2fb93 (diff)
downloadjgit-f91ee9afcc56d93829e6e57efb6f9db5c9fa70be.zip
jgit-f91ee9afcc56d93829e6e57efb6f9db5c9fa70be.tar.gz
jgit-f91ee9afcc56d93829e6e57efb6f9db5c9fa70be.tar.bz2
Fix CheckoutCommandTestrefs/changes/59/2159/1
Change-Id: Ieacae01de20d7729ef34e6e6a1523fbaf9db41a8 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
-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 1166464..2abd9d8 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();
}