| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CLASSPATH_TO_RESOURCES
Constant |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static boolean | Returns: true if the file existsthe repository db, String name of the file name)Check if file exists |
| private static ClassLoader | |
| public static byte[] | Returns: a single byte array that contains all bytes copied from input byte arrays.byte arrays to combine together. b)Concatenate byte arrays. |
| public static void | |
| public static void | |
| public static String | |
| public static File | |
| public static String | |
| public static String | Returns: the content of the filethe repository db, String file name name)Read a file's content |
| private static String | |
| public static void | write(File
file to write the string to. Caller is responsible for making
sure it is in the trash directory or will otherwise be cleaned
up at the end of the test. If the parent directory does not
exist, the missing parent directories are automatically
created. f, String content to write to the file. body)Write a string as a UTF-8 file. |
| public static Path | Returns: the path to the symbolic linkthe repository db, String the path of the symbolic link to create link, String the target of the symbolic link target)Write a symbolic link |
| public static File | Returns: the trash filethe repository db, final String file name name, final String file content data)Write a trash file. |
| public static File | Returns: the trash filethe repository db, final String under working tree subdir, final String file name name, final String file content data)Write a trash file. |
| CLASSPATH_TO_RESOURCES | back to summary |
|---|---|
| public static final String CLASSPATH_TO_RESOURCES Constant | |
| JGitTestUtil | back to summary |
|---|---|
| private JGitTestUtil() | |
| assertEquals | back to summary |
|---|---|
| public static void assertEquals(byte[] exp, byte[] act) Assert byte arrays are equal
| |
| check | back to summary |
|---|---|
| public static boolean check(Repository db, String name) Check if file exists
| |
| cl | back to summary |
|---|---|
| private static ClassLoader cl() | |
| concat | back to summary |
|---|---|
| public static byte[] concat(byte[]... b) Concatenate byte arrays.
| |
| copyTestResource | back to summary |
|---|---|
| public static void copyTestResource(String name, File dest) throws IOException Copy test resource.
| |
| deleteTrashFile | back to summary |
|---|---|
| public static void deleteTrashFile(final Repository db, final String name) throws IOException Delete a trash file.
| |
| getName | back to summary |
|---|---|
| public static String getName() Get name of current test by inspecting stack trace
| |
| getTestResourceFile | back to summary |
|---|---|
| public static File getTestResourceFile(String fileName) Get test resource file. | |
| read | back to summary |
|---|---|
| public static String read(File file) throws IOException Fully read a UTF-8 file and return as a string.
| |
| read | back to summary |
|---|---|
| public static String read(Repository db, String name) throws IOException Read a file's content
| |
| s | back to summary |
|---|---|
| private static String s(byte[] raw) | |
| write | back to summary |
|---|---|
| public static void write(File f, String body) throws IOException Write a string as a UTF-8 file.
| |
| writeLink | back to summary |
|---|---|
| public static Path writeLink(Repository db, String link, String target) throws Exception Write a symbolic link
| |
| writeTrashFile | back to summary |
|---|---|
| public static File writeTrashFile(final Repository db, final String name, final String data) throws IOException Write a trash file.
| |
| writeTrashFile | back to summary |
|---|---|
| public static File writeTrashFile(final Repository db, final String subdir, final String name, final String data) throws IOException Write a trash file.
| |
| Access | Constructor and Description |
|---|---|
| private |
| GatherStackTrace | back to summary |
|---|---|
| private GatherStackTrace() | |