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


Java Event类代码示例

本文整理汇总了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;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:18,代码来源:DefaultAnnotationScreenshootingStrategy.java

示例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;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:13,代码来源:DefaultScreenshootingStrategy.java

示例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;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:16,代码来源:DefaultVideoStrategy.java

示例4: isTakingAction

import org.jboss.arquillian.core.spi.event.Event; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event, TestResult result) {
    return false;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:5,代码来源:SkippingVideoStrategy.java

示例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);
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:7,代码来源:RecorderStrategy.java


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