當前位置: 首頁>>代碼示例>>Java>>正文


Java RuleChain.around方法代碼示例

本文整理匯總了Java中org.junit.rules.RuleChain.around方法的典型用法代碼示例。如果您正苦於以下問題:Java RuleChain.around方法的具體用法?Java RuleChain.around怎麽用?Java RuleChain.around使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.junit.rules.RuleChain的用法示例。


在下文中一共展示了RuleChain.around方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: getClassRule

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
/**
 * Create a RuleChain containing a RepositoryFixture for each of the repositories we are testing against
 *
 * @return a RuleChain
 */
@ClassRule
public static TestRule getClassRule() {
    // Put all the fixtures into one chain rule because we want to set up all the repositories at the start of the test, test with them and tear them down at the end
    RuleChain chain = RuleChain.emptyRuleChain();
    for (RepoData repoData : getRepoDataList()) {
        chain = chain.around(repoData.fixture);
    }
    return chain;
}
 
開發者ID:WASdev,項目名稱:tool.lars,代碼行數:15,代碼來源:ResourceFilteringTest.java

示例3: 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

示例4: withBefores

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
@Override
protected Statement withBefores(FrameworkMethod method, Object target, Statement statement) {
	@SuppressWarnings("deprecation")
	Statement junitBefores = super.withBefores(method, target, statement);
	
	List<TestRule> chainedRules = new ArrayList<TestRule>(1);
	RuleChain chain = RuleChain.emptyRuleChain();
	
	for (TestRule nucleusComponentInjectionRule : nucleusComponenInjectionRules()) {
		chain = chain.around(nucleusComponentInjectionRule);
	}
	
	chainedRules.add(chain);		
	return new RunRules(junitBefores, chainedRules, getDescription());
}
 
開發者ID:Roanis,項目名稱:atg-tdd,代碼行數:16,代碼來源:NucleusAwareJunit4ClassRunner.java

示例5: 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

示例6: appendInnerMostRules

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
@Override
protected RuleChain appendInnerMostRules(final RuleChain outerRuleChain) {
	return outerRuleChain.around(new DeleteOrderRule(ORDER_NUMBER));
}
 
開發者ID:scenarioo,項目名稱:scenarioo-example-swtbot-e4,代碼行數:5,代碼來源:CreateOrderTest.java

示例7: appendInnerMostRules

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
@Override
protected RuleChain appendInnerMostRules(final RuleChain outerRuleChain) {
	return outerRuleChain.around(new DeleteOrderRule(TEST_ORDER_NUMBER));
}
 
開發者ID:scenarioo,項目名稱:scenarioo-example-swtbot-e4,代碼行數:5,代碼來源:AddPositionEditorBecomesAPositionDetailEditorAndGetsFocusedTest.java

示例8: appendInnerMostRules

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
@Override
protected RuleChain appendInnerMostRules(final RuleChain outerRuleChain) {
	return outerRuleChain.around(new DeleteOrderRule(TARGET_ORDER_NUMBER));
}
 
開發者ID:scenarioo,項目名稱:scenarioo-example-swtbot-e4,代碼行數:5,代碼來源:EditOrderNumberUpdatesOpenedPositionsNotYetImplementedTest.java

示例9: appendInnerMostRules

import org.junit.rules.RuleChain; //導入方法依賴的package包/類
@Override
protected RuleChain appendInnerMostRules(final RuleChain outerRuleChain) {
	return outerRuleChain.around(new DeleteOrderRule(CreateTempOrderRule.ORDER_NUMBER_TEMP));
}
 
開發者ID:scenarioo,項目名稱:scenarioo-example-swtbot-e4,代碼行數:5,代碼來源:ChangeArticleUpdatesTheOrderOverviewTest.java


注:本文中的org.junit.rules.RuleChain.around方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。