本文整理匯總了Java中org.gradle.api.internal.tasks.testing.DefaultTestOutputEvent類的典型用法代碼示例。如果您正苦於以下問題:Java DefaultTestOutputEvent類的具體用法?Java DefaultTestOutputEvent怎麽用?Java DefaultTestOutputEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DefaultTestOutputEvent類屬於org.gradle.api.internal.tasks.testing包,在下文中一共展示了DefaultTestOutputEvent類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onOutput
import org.gradle.api.internal.tasks.testing.DefaultTestOutputEvent; //導入依賴的package包/類
@Override
public void onOutput(CharSequence output) {
if (outputOwner == null) {
throw new RuntimeException("Unable send output event from test executor. Please report this problem. Destination: " + dest + ", event: " + output.toString());
}
processor.output(outputOwner, new DefaultTestOutputEvent(dest, output.toString()));
}
示例2: testFailed
import org.gradle.api.internal.tasks.testing.DefaultTestOutputEvent; //導入依賴的package包/類
@Override
public synchronized void testFailed(int status, String testId, String testName, String trace, String expected, String actual) {
String message = testName + " failed";
if (expected != null || actual != null) {
message += " (expected=" + expected + ", actual=" + actual + ")";
}
this.resultProcessor.output(this.currentTestMethod.getId(), new DefaultTestOutputEvent(TestOutputEvent.Destination.StdOut, message));
this.resultProcessor.failure(this.currentTestMethod.getId(), new EclipseTestFailure(message, trace));
}