當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。