public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.jgit.lib.Repository |
db
Test repository, initialized for this test case.
|
protected File |
trash
Working directory of
db. |
author, committer| Constructor and Description |
|---|
CLIRepositoryTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertArrayOfLinesEquals(String[] expected,
String[] actual) |
protected String |
cmdString(String... cmds) |
protected void |
deleteTrashFile(String name) |
protected String |
escapeJava(String line) |
protected String[] |
execute(String... cmds) |
protected String[] |
executeAndPrint(String... cmds)
Execute the given commands and print the output to stdout.
|
protected String[] |
executeAndPrintTestCode(String... cmds)
Execute the given commands and print test code comparing expected and
actual output.
|
void |
setUp() |
protected File |
writeTrashFile(String name,
String data) |
addRepoToClose, createBareRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, read, recursiveDelete, runHook, tearDown, tick, write, writeprotected org.eclipse.jgit.lib.Repository db
public void setUp()
throws Exception
setUp in class LocalDiskRepositoryTestCaseExceptionprotected File writeTrashFile(String name, String data) throws IOException
IOExceptionprotected void deleteTrashFile(String name) throws IOException
IOExceptionprotected String[] executeAndPrint(String... cmds) throws Exception
execute(String...) when preparing
a test case: the command is executed and then its output is printed on
stdout, thus making it easier to prepare the correct command and expected
output for the test case.cmds - The commands to executeexecute(String...)Exceptionprotected String[] executeAndPrintTestCode(String... cmds) throws Exception
execute(String...) when preparing a test case: the command is
executed and test code is generated using the command output as a
template of what is expected. The code generated is printed on stdout and
can be pasted in the test case function.cmds - The commands to executeexecute(String...)ExceptionCopyright © 2013. All rights reserved.