aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst
diff options
context:
space:
mode:
authorFrançois Rey <eclipse.org@francois.rey.name>2012-09-14 00:11:18 +0200
committerChris Aniszczyk <zx@twitter.com>2013-03-27 09:26:13 -0400
commit741ecf56b7eab161326806d566ef22c911496789 (patch)
treee63c0f225ad81972f096463f5a4b46244a7050c5 /org.eclipse.jgit.pgm.test/tst
parentedd47d10b9e96bde1958b19d04feef3cc8bf00fc (diff)
downloadjgit-741ecf56b7eab161326806d566ef22c911496789.tar.gz
jgit-741ecf56b7eab161326806d566ef22c911496789.zip
New functions to facilitate the writing of CLI test cases
Writing CLI test cases is tedious because of all the formatting and escaping subtleties needed when comparing actual output with what's expected. While creating a test case the two new functions are to be used instead of the existing execute() in order to prepare the correct command and expected output and to generate the corresponding test code that can be pasted into the test case function. Change-Id: Ia66dc449d3f6fb861c300fef8b56fba83a56c94c Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/StatusTest.java14
1 files changed, 0 insertions, 14 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/StatusTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/StatusTest.java
index ed2c5d0375..13f8c319c1 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/StatusTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/StatusTest.java
@@ -42,7 +42,6 @@
*/
package org.eclipse.jgit.pgm;
-import static org.junit.Assert.assertEquals;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
@@ -214,17 +213,4 @@ public class StatusTest extends CLIRepositoryTestCase {
"" //
}, execute("git status")); //
}
-
- private void assertArrayOfLinesEquals(String[] expected, String[] actual) {
- assertEquals(toText(expected), toText(actual));
- }
-
- private String toText(String[] lines) {
- StringBuilder b = new StringBuilder();
- for (String s : lines) {
- b.append(s);
- b.append('\n');
- }
- return b.toString();
- }
}