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


Java EachTestNotifier.fireTestStarted方法代码示例

本文整理汇总了Java中org.junit.internal.runners.model.EachTestNotifier.fireTestStarted方法的典型用法代码示例。如果您正苦于以下问题:Java EachTestNotifier.fireTestStarted方法的具体用法?Java EachTestNotifier.fireTestStarted怎么用?Java EachTestNotifier.fireTestStarted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.junit.internal.runners.model.EachTestNotifier的用法示例。


在下文中一共展示了EachTestNotifier.fireTestStarted方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runChild

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
@Override
public void runChild(final FrameworkMethod method, final RunNotifier notifier) {
    final Description description = describeChild(method);
    if (this.isIgnored(method)) {
        notifier.fireTestIgnored(description);
    } else {
        EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
        eachNotifier.fireTestStarted();
        boolean ignored = false;
        try {
            this.methodBlock(method).evaluate();
        } catch (AssumptionViolatedException ave) {
            eachNotifier.addFailedAssumption(ave);
        } catch (Throwable e) {
            if (validateForGraphComputer(e)) {
                eachNotifier.fireTestIgnored();
                logger.info(e.getMessage());
                ignored = true;
            } else
                eachNotifier.addFailure(e);
        } finally {
            if (!ignored)
                eachNotifier.fireTestFinished();
        }
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:27,代码来源:GremlinProcessRunner.java

示例2: runChild

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
	EachTestNotifier eachNotifier = makeNotifier( method, notifier );
       FuzzUnitTestMethod tTestMethod = (FuzzUnitTestMethod) method;

       eachNotifier.fireTestStarted();
       if( method.getAnnotation( Ignore.class ) != null  ) {
               eachNotifier.fireTestIgnored();
               return;
       }
       
       try {
           
           methodBlock( tTestMethod ).evaluate();

        
           } catch (Throwable e) {
			eachNotifier.addFailure( e );
		} finally {
           	  eachNotifier.fireTestFinished();
           }
       }
 
开发者ID:JoeBeeton,项目名称:FuzzUnit,代码行数:23,代码来源:FuzzUnitTestRunner.java

示例3: runChild

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
    Description description = describeChild(method);
    if (method.getAnnotation(Ignore.class) != null) {
        notifier.fireTestIgnored(description);
    } else {
        setLogContext(method);
        EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
        eachNotifier.fireTestStarted();
        try {
            runTestMethod(method, eachNotifier, config.getTimeoutRetries());
        } finally {
            eachNotifier.fireTestFinished();
            clearLogContext();
        }
    }
}
 
开发者ID:klarna,项目名称:HiveRunner,代码行数:18,代码来源:StandaloneHiveRunner.java

示例4: invokeTest

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
private void invokeTest(RunNotifier notifier, TestExecutorType type, FrameworkMethod method) {
    if ((type == null) || TestExecutorType.LOCAL.equals(type)) {
        runLeaf(methodBlock(method), describeChild(method), notifier);
    } else {
        EachTestNotifier eachNotifier = new EachTestNotifier(notifier, describeChild(method));
        try {
            eachNotifier.fireTestStarted();
            execute(type, method.getMethod()).get();
        } catch (Throwable e) {
            eachNotifier.addFailure(e);
        } finally {
            eachNotifier.fireTestFinished();
        }
    }
}
 
开发者ID:pravega,项目名称:pravega,代码行数:16,代码来源:SystemTestRunner.java

示例5: runLeafAndIgnoreErrors

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
private void runLeafAndIgnoreErrors(Statement statement, Description description, RunNotifier notifier) {
    EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description);
    eachNotifier.fireTestStarted();
    try {
        statement.evaluate();
    } catch (Throwable e) {
        // An error ? Surely you must be joking
    } finally {
        eachNotifier.fireTestFinished();
    }
}
 
开发者ID:bishiboosh,项目名称:junit-volkswagen,代码行数:12,代码来源:VolkswagenTestRunner.java

示例6: runChild

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
@Override
protected void runChild(Test child, RunNotifier notifier) {
    Description description = describeChild(child);
    EachTestNotifier eachTestNotifier = new EachTestNotifier(
            notifier, description);
    eachTestNotifier.fireTestStarted();
    try {
        child.statement.evaluate();
    } catch (Throwable t) {
        eachTestNotifier.addFailure(t);
    } finally {
        eachTestNotifier.fireTestFinished();
    }
}
 
开发者ID:stefanbirkner,项目名称:junit-playground,代码行数:15,代码来源:Java8Runner.java

示例7: beforeExecution

import org.junit.internal.runners.model.EachTestNotifier; //导入方法依赖的package包/类
@Override
protected void beforeExecution(final EachTestNotifier notifier) {
    notifier.fireTestStarted();
}
 
开发者ID:bechte,项目名称:junit-hierarchicalcontextrunner,代码行数:5,代码来源:MethodStatementExecutor.java


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