diff options
author | Dariusz Luksza <dariusz@luksza.org> | 2012-01-25 01:24:09 +0100 |
---|---|---|
committer | Dariusz Luksza <dariusz@luksza.org> | 2012-01-25 01:24:41 +0100 |
commit | b649eaa9a84819f48a9434af67ecab7e6881f37e (patch) | |
tree | bfac84d0f8e417f395f65c9859db872409f96049 /org.eclipse.jgit.test/tst/org/eclipse/jgit | |
parent | 2fa5bcd6bbf9e4905c9e022fa1cb371b96a02694 (diff) | |
download | jgit-b649eaa9a84819f48a9434af67ecab7e6881f37e.tar.gz jgit-b649eaa9a84819f48a9434af67ecab7e6881f37e.zip |
Move writeTrashFile and deleteFile into JGitTestUtil
Moves RepositoryTestCase.writeThashFile, RepositoryTestCase.deleteFile
and dependencies into JGitTestUtil for further reuse.
Required-by-EGit: If8dfa0251797aca56ddc825619500dc21885ba26
Change-Id: I6fc62c8e6626f907e544b5bbe5d64e864a2c323f
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java index 934c76cbb5..0c573ebe71 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java @@ -62,6 +62,7 @@ import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheBuilder; import org.eclipse.jgit.dircache.DirCacheCheckout; import org.eclipse.jgit.dircache.DirCacheEntry; +import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; @@ -98,14 +99,11 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { protected File writeTrashFile(final String name, final String data) throws IOException { - File path = new File(db.getWorkTree(), name); - write(path, data); - return path; + return JGitTestUtil.writeTrashFile(db, name, data); } protected void deleteTrashFile(final String name) throws IOException { - File path = new File(db.getWorkTree(), name); - FileUtils.delete(path); + JGitTestUtil.deleteTrashFile(db, name); } protected static void checkFile(File f, final String checkData) |