Quellcode durchsuchen

new: QTesterSuite - support for debug

Ranides Atterwim vor 10 Jahren
Ursprung
Commit
3deb7c8331

+ 10 - 0
assira.junit/src/main/java/net/ranides/assira/junit/QTesterSuite.java

@@ -41,10 +41,17 @@ public class QTesterSuite {
     private final List<TesterWrapper> testers = new ArrayList<>();
     
     private final OutputStream output;
+    
+    private boolean debug;
 
     public QTesterSuite(OutputStream output) {
         this.output = output;
     }
+    
+    public QTesterSuite debug(boolean value) {
+        this.debug = value;
+        return this;
+    }
 	
 	public QTesterSuite append(Object tester) {
         testers.add(new TesterWrapper(tester));
@@ -138,6 +145,9 @@ public class QTesterSuite {
                         );
                     }
                 } else if(ex.getTargetException() instanceof UnsupportedOperationException) {
+                    if(debug) {
+                        ex.printStackTrace();
+                    }
                     printf(" - SUITE: %s [%d] %s.%s - UNSUPPORTED%n",
                         type.getName(),
                         counter.next(),