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


Java RuleChain.outerRule方法代码示例

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


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

示例1: createRuleChain

import org.junit.rules.RuleChain; //导入方法依赖的package包/类
private RuleChain createRuleChain() {
	RuleChain ruleChain = RuleChain.outerRule(new LogTestStartedAndFinishedTestRule());
	ruleChain = ruleChain.around(new OrderOverviewCleanUpRule());
	ruleChain = appendInnerRules(ruleChain);
	ruleChain = appendInnerMostRules(ruleChain);
	return ruleChain;
}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:8,代码来源:BaseSWTBotTest.java

示例2: createRuleChain

import org.junit.rules.RuleChain; //导入方法依赖的package包/类
/**
 * Creates a {@link RuleChain} with {@link NucleusWithModules} as the first rule, so 
 * that it gets started before any attempt to load test data, or resolve components. 
 * Subsequent @NucleusWithXXX annotations, used for setting up test data, are added after 
 * {@link NucleusWithModules}, as are {@link NucleusComponent} rules.
 * 
 * @param statement
 * @param testNucleus
 * @return
 */
protected Statement createRuleChain(Statement statement, NucleusRequired testNucleus) {
	List<TestRule> chainedRules = new ArrayList<TestRule>(1);		
	RuleChain chain = RuleChain.outerRule(new NucleusWithModules(testNucleus.modules(), testNucleus.isUseTestConfigLayer(), getTestClass().getJavaClass()));
	
	for (TestRule dataRule : classDataRules()) {
		chain = chain.around(dataRule);
	}
	                    													
	chainedRules.add(chain);		
	return new RunRules(statement, chainedRules, getDescription());
}
 
开发者ID:Roanis,项目名称:atg-tdd,代码行数:22,代码来源:NucleusAwareJunit4ClassRunner.java

示例3: create

import org.junit.rules.RuleChain; //导入方法依赖的package包/类
/**
 * Creates a {@link RuleChain} where the rules are evaluated in the order you pass in.
 * 
 * @param testRules
 *            test rules to evaluate
 * @return a new rule chain.
 */
public static RuleChain create(final TestRule... testRules) {
    if (testRules == null || testRules.length == 0) {
        return RuleChain.emptyRuleChain();
    }
    RuleChain ruleChain = RuleChain.outerRule(testRules[0]);
    for (int i = 1; i < testRules.length; i++) {
        ruleChain = ruleChain.around(testRules[i]);
    }
    return ruleChain;
}
 
开发者ID:apache,项目名称:logging-log4j2,代码行数:18,代码来源:RuleChainFactory.java

示例4: chain

import org.junit.rules.RuleChain; //导入方法依赖的package包/类
/**
 * Creates a {@link RuleChain} with the {@link TestGroupRule} as outer rule. This is equivalent to:
 * <pre>
 * RuleChain.outerRule(TestGroupRule.create());
 * </pre>
 */
public static RuleChain chain() {
  return RuleChain.outerRule(create());
}
 
开发者ID:ferstl,项目名称:junit-testgroups,代码行数:10,代码来源:TestGroupRule.java


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