當前位置: 首頁>>代碼示例>>Java>>正文


Java Failure.getDescription方法代碼示例

本文整理匯總了Java中org.junit.runner.notification.Failure.getDescription方法的典型用法代碼示例。如果您正苦於以下問題:Java Failure.getDescription方法的具體用法?Java Failure.getDescription怎麽用?Java Failure.getDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.junit.runner.notification.Failure的用法示例。


在下文中一共展示了Failure.getDescription方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: isKnownIssue

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
private boolean isKnownIssue(Failure failure) {

		if (failure == null) {
			return false;
		}

		if (failure.getDescription() == null) {
			return false;
		}

		final KnownIssue knownIssue = failure.getDescription().getAnnotation(KnownIssue.class);
		final String message = failure.getMessage();

		if (knownIssue == null || message == null || knownIssue.value() == null) {
			return false;
		}

		if (message.contains(knownIssue.value())) {
			return true;
		}

		return false;
	}
 
開發者ID:xtf-cz,項目名稱:xtf,代碼行數:24,代碼來源:IntermediateReporter.java

示例2: executionFailed

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
/** Mark execution of given {@link Description} as failed. Parent descriptions may be updated accordingly. */
public void executionFailed(Failure failure) {
	Description description = failure.getDescription();
	allStatuses.put(description, ExecutionStatus.FAILED);
	allFailures.put(description, failure);
	updateParents(description, ExecutionStatus.FAILED);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:8,代碼來源:ExecutionResults.java

示例3: testAssumptionFailure

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
public void testAssumptionFailure(Failure failure) {
  final Description description = failure.getDescription();
  try {
    testFailure(failure, description, MapSerializerUtil.TEST_IGNORED, true);
  }
  catch (Exception ignore) {}
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:JUnit4TestListener.java

示例4: testFailure

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
public synchronized void testFailure(Failure failure) throws Exception {
  final Description description = failure.getDescription();
  final Throwable throwable = failure.getException();

  final Throwable cause = throwable.getCause();
  if (ComparisonFailureData.isAssertionError(throwable.getClass()) || 
      ComparisonFailureData.isAssertionError(cause != null ? cause.getClass() : null)) {
    // junit4 makes no distinction between errors and failures
    doAddFailure(description, throwable);
  }

  else {
    prepareDefectPacket(description, throwable).send();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:JUnit4TestResultsSender.java

示例5: formFailureDescription

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
private static String formFailureDescription(Failure failure) {
    return failure.getMessage() + " " +failure.getDescription() + " " + failure.getException().getMessage();
}
 
開發者ID:SeriyBg,項目名稱:junit-easy-tools,代碼行數:4,代碼來源:ResultAssertions.java

示例6: testAssumptionFailure

import org.junit.runner.notification.Failure; //導入方法依賴的package包/類
public void testAssumptionFailure(Failure failure) {
  final Description description = failure.getDescription();
  prepareIgnoredPacket(description, null).addThrowable(failure.getException()).send();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:JUnit4TestResultsSender.java


注:本文中的org.junit.runner.notification.Failure.getDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。