@Test public void testSevereViolation() { SimpleProgressCheck check = new SimpleProgressCheck(); PackageId id0 = PackageId.fromString("my_packages:test_0:1.0"); PackageId id1 = PackageId.fromString("my_packages:test_1:1.0"); check.severeViolation("description", id0, id1); assertTrue("violation reported", check.getReportedViolations().stream() .anyMatch(violation -> violation.getSeverity() == Severity.SEVERE && "description".equals(violation.getDescription()) && violation.getPackages().contains(id0) && violation.getPackages().contains(id1) )); }
protected final void severeViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.SEVERE) .withDescription(description) .withPackage(packages)); }
SimpleProgressCheck implements ProgressCheck { protected final void severeViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.SEVERE) .withDescription(description) .withPackage(packages)); } }
SimpleProgressCheck implements ProgressCheck { protected final void severeViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.SEVERE) .withDescription(description) .withPackage(packages)); }  }
SimpleProgressCheck implements ProgressCheck { protected final void severeViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.SEVERE) .withDescription(description) .withPackage(packages)); }  @Override void setResourceBundle(final ResourceBundle resourceBundle); @Override void startedScan(); @Override Collection<Violation> getReportedViolations(); }
SimpleProgressCheck implements ProgressCheck { protected final void severeViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.SEVERE) .withDescription(description) .withPackage(packages)); }  @Override void setResourceBundle(final ResourceBundle resourceBundle); @Override void startedScan(); @Override Collection<Violation> getReportedViolations();  }