diff options
author | Mathias Kinzler <mathias.kinzler@sap.com> | 2010-12-21 10:06:19 +0100 |
---|---|---|
committer | Mathias Kinzler <mathias.kinzler@sap.com> | 2010-12-21 10:06:19 +0100 |
commit | e272ca0f1429440af3fde06387b8815a7f9d4547 (patch) | |
tree | 32ca7167214624be5ff274a4949bb282188f4d6e /org.eclipse.jgit.test/tst/org/eclipse/jgit | |
parent | 8f419dc5e650047565cca34afc7524bcee3d32eb (diff) | |
download | jgit-e272ca0f1429440af3fde06387b8815a7f9d4547.tar.gz jgit-e272ca0f1429440af3fde06387b8815a7f9d4547.zip |
CheckoutResult: return paths instead of Files
As discussed in
http://egit.eclipse.org/r/#change,2127
we should use paths relative the working directory instead of Files to
notify the caller about conflicts and nondeleted files.
Change-Id: I034c7bd846f0df78d97bc246f38d411f29713dde
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java | 7 |
1 files changed, 3 insertions, 4 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 2abd9d84e7..1166464d5e 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,9 +128,8 @@ public class CheckoutCommandTest extends RepositoryTestCase { } } - public void testCheckoutWithConflict() throws IOException { + public void testCheckoutWithConflict() { CheckoutCommand co = git.checkout(); - File trashFile = writeTrashFile("Test.txt", "Another change"); try { writeTrashFile("Test.txt", "Another change"); assertEquals(Status.NOT_TRIED, co.getResult().getStatus()); @@ -138,7 +137,7 @@ public class CheckoutCommandTest extends RepositoryTestCase { fail("Should have failed"); } catch (Exception e) { assertEquals(Status.CONFLICTS, co.getResult().getStatus()); - assertTrue(co.getResult().getConflictList().contains(trashFile)); + assertTrue(co.getResult().getConflictList().contains("Test.txt")); } } @@ -171,7 +170,7 @@ public class CheckoutCommandTest extends RepositoryTestCase { co.setName("test").call(); assertTrue(testFile.exists()); assertEquals(Status.NONDELETED, co.getResult().getStatus()); - assertTrue(co.getResult().getUndeletedList().contains(testFile)); + assertTrue(co.getResult().getUndeletedList().contains("Test.txt")); } finally { fis.close(); } |