本文整理匯總了Java中org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes.add方法的典型用法代碼示例。如果您正苦於以下問題:Java ConditionAndOutcomes.add方法的具體用法?Java ConditionAndOutcomes.add怎麽用?Java ConditionAndOutcomes.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes
的用法示例。
在下文中一共展示了ConditionAndOutcomes.add方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testDuplicateConditionAndOutcomes
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes; //導入方法依賴的package包/類
@Test
public void testDuplicateConditionAndOutcomes() {
ConditionAndOutcome outcome1 = new ConditionAndOutcome(this.condition1,
new ConditionOutcome(true, "Message 1"));
ConditionAndOutcome outcome2 = new ConditionAndOutcome(this.condition2,
new ConditionOutcome(true, "Message 2"));
ConditionAndOutcome outcome3 = new ConditionAndOutcome(this.condition3,
new ConditionOutcome(true, "Message 2"));
assertThat(outcome1).isEqualTo(outcome1);
assertThat(outcome1).isNotEqualTo(outcome2);
assertThat(outcome2).isEqualTo(outcome3);
ConditionAndOutcomes outcomes = new ConditionAndOutcomes();
outcomes.add(this.condition1, new ConditionOutcome(true, "Message 1"));
outcomes.add(this.condition2, new ConditionOutcome(true, "Message 2"));
outcomes.add(this.condition3, new ConditionOutcome(true, "Message 2"));
assertThat(getNumberOfOutcomes(outcomes)).isEqualTo(2);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:21,代碼來源:ConditionEvaluationReportTests.java
示例2: testDuplicateConditionAndOutcomes
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes; //導入方法依賴的package包/類
@Test
public void testDuplicateConditionAndOutcomes() {
ConditionAndOutcome outcome1 = new ConditionAndOutcome(this.condition1,
new ConditionOutcome(true, "Message 1"));
ConditionAndOutcome outcome2 = new ConditionAndOutcome(this.condition2,
new ConditionOutcome(true, "Message 2"));
ConditionAndOutcome outcome3 = new ConditionAndOutcome(this.condition3,
new ConditionOutcome(true, "Message 2"));
assertThat(outcome1, equalTo(outcome1));
assertThat(outcome1, not(equalTo(outcome2)));
assertThat(outcome2, equalTo(outcome3));
ConditionAndOutcomes outcomes = new ConditionAndOutcomes();
outcomes.add(this.condition1, new ConditionOutcome(true, "Message 1"));
outcomes.add(this.condition2, new ConditionOutcome(true, "Message 2"));
outcomes.add(this.condition3, new ConditionOutcome(true, "Message 2"));
assertThat(getNumberOfOutcomes(outcomes), equalTo(2));
}