]> source.dussan.org Git - jgit.git/commitdiff
Set parameter name in parameterized http tests 20/149120/2
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 8 Sep 2019 10:34:27 +0000 (12:34 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 8 Sep 2019 15:34:13 +0000 (17:34 +0200)
This shows the class name of the HTTP factory used in each test run.

Change-Id: I7c1df20f0e138dc7e3120fe87e80d40ab17dd8c8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AllFactoriesHttpTestCase.java

index 266194f654a427a4dba75d6d978485bcb344779f..cb30b3f7b738011b4c72805a2fecee58be825e80 100644 (file)
@@ -64,12 +64,20 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(Parameterized.class)
 public abstract class AllFactoriesHttpTestCase extends HttpTestCase {
 
-       @Parameters
+       @Parameters(name = "{0}")
        public static Collection<Object[]> data() {
                // run all tests with both connection factories we have
-               return Arrays
-                               .asList(new Object[][] { { new JDKHttpConnectionFactory() },
-                                               { new HttpClientConnectionFactory() } });
+               return Arrays.asList(new Object[][] { { new JDKHttpConnectionFactory() {
+                       @Override
+                       public String toString() {
+                               return this.getClass().getSuperclass().getName();
+                       }
+               } }, { new HttpClientConnectionFactory() {
+                       @Override
+                       public String toString() {
+                               return this.getClass().getSuperclass().getName();
+                       }
+               } } });
        }
 
        protected AllFactoriesHttpTestCase(HttpConnectionFactory cf) {