本文整理汇总了Java中org.jboss.arquillian.core.spi.event.Event类的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于org.jboss.arquillian.core.spi.event包,在下文中一共展示了Event类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isTakingAction
import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event, TestResult result) {
if (event instanceof AfterTestLifecycleEvent && !(event instanceof After)) {
Screenshot screenshotAnnotation = ScreenshotAnnotationScanner.getScreenshotAnnotation(((AfterTestLifecycleEvent) event).getTestMethod());
if (screenshotAnnotation != null) {
if (screenshotAnnotation.takeAfterTest()) {
return true;
}
if (result.getStatus() == Status.FAILED && screenshotAnnotation.takeWhenTestFailed()) {
return true;
}
}
}
return false;
}
示例2: isTakingAction
import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event, TestResult result) {
if (event instanceof AfterTestLifecycleEvent && !(event instanceof After)) {
if (configuration.getTakeAfterTest()) {
return true;
}
if (result.getStatus() == Status.FAILED && configuration.getTakeWhenTestFailed()) {
return true;
}
}
return false;
}
示例3: isTakingAction
import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event, TestResult result) {
if (event instanceof AfterTestLifecycleEvent && !(event instanceof After)) {
switch (result.getStatus()) {
case FAILED:
return configuration.getTakeOnlyOnFail();
case PASSED:
return configuration.getStartBeforeTest() || configuration.getTakeOnlyOnFail();
case SKIPPED:
default:
return false;
}
}
return false;
}
示例4: isTakingAction
import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event, TestResult result) {
return false;
}
示例5: isTakingAction
import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
/**
* @param event Arquillian event to decide the action taking for
* @param result result accompanied with {@code event}
* @return true if some action should should be taken, false otherwise
*/
boolean isTakingAction(Event event, TestResult result);