1 18 19 package org.apache.tools.ant.taskdefs.optional.junit; 20 21 import java.io.IOException ; 22 import java.io.OutputStream ; 23 import org.apache.tools.ant.AntClassLoader; 24 import org.apache.tools.ant.types.Permissions; 25 26 41 public interface JUnitTaskMirror { 42 43 52 void addVmExit(JUnitTest test, JUnitResultFormatterMirror formatter, 53 OutputStream out, String message, String testCase); 54 55 66 JUnitTestRunnerMirror newJUnitTestRunner(JUnitTest test, boolean haltOnError, 67 boolean filterTrace, boolean haltOnFailure, boolean showOutput, 68 boolean logTestListenerEvents, AntClassLoader classLoader); 69 70 74 SummaryJUnitResultFormatterMirror newSummaryJUnitResultFormatter(); 75 76 77 78 public interface JUnitResultFormatterMirror { 79 83 void setOutput(OutputStream outputStream); 84 } 85 86 87 public interface SummaryJUnitResultFormatterMirror 88 extends JUnitResultFormatterMirror { 89 90 94 void setWithOutAndErr(boolean value); 95 } 96 97 98 public interface JUnitTestRunnerMirror { 99 100 107 String IGNORED_FILE_NAME = "IGNORETHIS"; 108 109 112 int SUCCESS = 0; 113 114 117 int FAILURES = 1; 118 119 122 int ERRORS = 2; 123 124 128 void setPermissions(Permissions perm); 129 130 131 void run(); 132 133 137 void addFormatter(JUnitResultFormatterMirror formatter); 138 139 144 int getRetCode(); 145 146 151 void handleErrorFlush(String output); 152 153 158 void handleErrorOutput(String output); 159 160 165 void handleOutput(String output); 166 167 178 int handleInput(byte[] buffer, int offset, int length) throws IOException ; 179 180 185 void handleFlush(String output); 186 187 } 188 } 189 | Popular Tags |