当前位置: 首页>>代码示例>>Java>>正文


Java ITestRunListener2类代码示例

本文整理汇总了Java中org.eclipse.jdt.internal.junit.model.ITestRunListener2的典型用法代码示例。如果您正苦于以下问题:Java ITestRunListener2类的具体用法?Java ITestRunListener2怎么用?Java ITestRunListener2使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ITestRunListener2类属于org.eclipse.jdt.internal.junit.model包,在下文中一共展示了ITestRunListener2类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFailed

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
public synchronized void testFailed(int status, String testId, String testName, String trace, String expected,
		String actual) {
	String statusMessage = String.valueOf(status);
	if (status == ITestRunListener2.STATUS_OK) {
		numberOfTestsPassed++;
		statusMessage = "OK";
	} else if (status == ITestRunListener2.STATUS_FAILURE) {
		numberOfTestsFailed++;
		statusMessage = "FAILED";
	} else if (status == ITestRunListener2.STATUS_ERROR) {
		numberOfTestsWithError++;
		statusMessage = "ERROR";
	}
	System.out.println("  Test Failed  - " + count() + " - " + testName + " - status: " + statusMessage
			+ ", trace: " + trace + ", expected: " + expected + ", actual: " + actual);
}
 
开发者ID:SiriusLab,项目名称:ModelDebugging,代码行数:17,代码来源:PDETestListener.java

示例2: testFailed

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
@Override
   public synchronized void testFailed(int status, String testId, String testName, String trace, String expected, String actual) {
       String statusMessage = String.valueOf(status);
       if (status == ITestRunListener2.STATUS_OK) {
           numberOfTestsPassed++;
           statusMessage = "OK";
       } else if (status == ITestRunListener2.STATUS_FAILURE) {
           numberOfTestsFailed++;
           statusMessage = "FAILED";
           getXMLJUnitResultFormatter().addFailure(currentTest, new AssertionFailedError(trace));
       } else if (status == ITestRunListener2.STATUS_ERROR) {
           numberOfTestsWithError++;
           statusMessage = "ERROR";
           getXMLJUnitResultFormatter().addError(currentTest, new Exception(trace));
       }
       System.out.println("  Test Failed  - " + count() + " - " + testName + " - status: " + statusMessage
               + ", trace: " + trace + ", expected: " + expected + ", actual: " + actual);
}
 
开发者ID:kjlubick,项目名称:fb-contrib-eclipse-quick-fixes,代码行数:19,代码来源:PDETestListener.java

示例3: testReran

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
public synchronized void testReran(String testId, String testClass, String testName, int status, String trace,
		String expected, String actual) {
	String statusMessage = String.valueOf(status);
	if (status == ITestRunListener2.STATUS_OK) {
		statusMessage = "OK";
	} else if (status == ITestRunListener2.STATUS_FAILURE) {
		statusMessage = "FAILED";
	} else if (status == ITestRunListener2.STATUS_ERROR) {
		statusMessage = "ERROR";
	}

	System.out.println("  Test ReRan   - " + testName + " - test class: " + testClass + ", status: " + statusMessage
			+ ", trace: " + trace + ", expected: " + expected + ", actual: " + actual);
}
 
开发者ID:SiriusLab,项目名称:ModelDebugging,代码行数:15,代码来源:PDETestListener.java

示例4: run

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
public void run(int port) throws InterruptedException {
	pdeTestListener = new PDETestListener(this, suiteName);
	new RemoteTestRunnerClient().startListening(new ITestRunListener2[] { pdeTestListener }, port);
	System.out.println("Listening on port " + port + " for test suite " + suiteName + " results ...");
	synchronized (this) {
		wait();
	}
}
 
开发者ID:SiriusLab,项目名称:ModelDebugging,代码行数:9,代码来源:PDETestResultsCollector.java

示例5: testReran

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
@Override
   public synchronized void testReran(String testId, String testClass, String testName, int status, String trace, String expected, String actual) {
       String statusMessage = String.valueOf(status);
       if (status == ITestRunListener2.STATUS_OK) {
           statusMessage = "OK";
       } else if (status == ITestRunListener2.STATUS_FAILURE) {
           statusMessage = "FAILED";
       } else if (status == ITestRunListener2.STATUS_ERROR) {
           statusMessage = "ERROR";
       }

       System.out.println("  Test ReRan   - " + testName + " - test class: " + testClass + ", status: " + statusMessage
               + ", trace: " + trace + ", expected: " + expected + ", actual: " + actual);
}
 
开发者ID:kjlubick,项目名称:fb-contrib-eclipse-quick-fixes,代码行数:15,代码来源:PDETestListener.java

示例6: run

import org.eclipse.jdt.internal.junit.model.ITestRunListener2; //导入依赖的package包/类
private void run(int port) throws InterruptedException {
    pdeTestListener = new PDETestListener(this, suiteName);
    new RemoteTestRunnerClient().startListening(new ITestRunListener2[] {pdeTestListener}, port);
    System.out.println("Listening on port " + port + " for test suite " + suiteName + " results ...");
    synchronized (this) {
        wait();
    }
}
 
开发者ID:kjlubick,项目名称:fb-contrib-eclipse-quick-fixes,代码行数:9,代码来源:PDETestResultsCollector.java


注:本文中的org.eclipse.jdt.internal.junit.model.ITestRunListener2类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。