public Report(ConditionEvaluationReport report) { this.positiveMatches = new LinkedMultiValueMap<String, MessageAndCondition>(); this.negativeMatches = new LinkedMultiValueMap<String, MessageAndCondition>(); this.exclusions = report.getExclusions(); for (Map.Entry<String, ConditionAndOutcomes> entry : report .getConditionAndOutcomesBySource().entrySet()) { add(entry.getValue().isFullMatch() ? this.positiveMatches : this.negativeMatches, entry.getKey(), entry.getValue()); } if (report.getParent() != null) { this.parent = new Report(report.getParent()); } }
@Test public void invoke() throws Exception { this.context = new AnnotationConfigApplicationContext(); this.context.register(this.configClass); this.context.refresh(); Report report = getEndpointBean().invoke(); assertThat(report.getPositiveMatches()).isEmpty(); assertThat(report.getNegativeMatches()).containsKey("a"); assertThat(report.getExclusions()).contains("com.foo.Bar"); }
@Test public void invoke() throws Exception { this.context = new AnnotationConfigApplicationContext(); this.context.register(this.configClass); this.context.refresh(); Report report = getEndpointBean().invoke(); assertTrue(report.getPositiveMatches().isEmpty()); assertTrue(report.getNegativeMatches().containsKey("a")); assertTrue(report.getExclusions().contains("com.foo.Bar")); }
@Override public Report invoke() { return new Report(this.autoConfigurationReport); }
public Report getParent() { return this.parent; }