Browse Source

Fix CheckoutCommandTest

Change-Id: Ieacae01de20d7729ef34e6e6a1523fbaf9db41a8
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
stable-0.11
Mathias Kinzler 14 years ago
parent
commit
f91ee9afcc
  1. 7
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java

7
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();
}

Loading…
Cancel
Save