本文整理匯總了Java中ru.yandex.qatools.allure.model.Status.FAILED屬性的典型用法代碼示例。如果您正苦於以下問題:Java Status.FAILED屬性的具體用法?Java Status.FAILED怎麽用?Java Status.FAILED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類ru.yandex.qatools.allure.model.Status
的用法示例。
在下文中一共展示了Status.FAILED屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: process
/**
* Change step status to {@link ru.yandex.qatools.allure.model.Status#FAILED} if
* throwable instance of AssertionError and to {@link ru.yandex.qatools.allure.model.Status#BROKEN}
* otherwise
*
* @param step which will be changed
*/
@Override
public void process(Step step) {
Status status = throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN;
step.setStatus(status);
}
示例2: getStatus
/**
* Returns the status {@link ru.yandex.qatools.allure.model.Status#FAILED} if
* throwable instance of {@link AssertionError} or
* {@link ru.yandex.qatools.allure.model.Status#BROKEN} otherwise
*
* @return the status
*/
@Override
protected Status getStatus() {
return throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN;
}
示例3: getMessage
/**
* Returns default message (using in {@link ru.yandex.qatools.allure.events.TestCaseStatusChangeEvent}
* if throwable not specified)
*
* @return default message
*/
@Override
protected String getMessage() {
return getStatus() == Status.FAILED ? "Test failed with unknown reason" : "Test broken with unknown reason";
}