PuppetEnforceLicenseValueCheck extends AbstractPuppetCheck { @VisibleForTesting public void setLicense(String license) { this.license = license; }  @Override void visitPair(PairTree pair); @VisibleForTesting void setLicense(String license);  }
@Test public void should_match_the_required_custom_value_and_not_raise_any_issue() { PuppetEnforceLicenseValueCheck check = new PuppetEnforceLicenseValueCheck(); check.setLicense("blabla"); JSONCheckVerifier.verify( check, CheckTestUtils.getTestFile("puppet/license/match-required-value-custom/metadata.json")) .noMore(); }
@Test public void should_not_match_the_required_custom_value_and_raise_an_issue() { PuppetEnforceLicenseValueCheck check = new PuppetEnforceLicenseValueCheck(); check.setLicense("blabla"); JSONCheckVerifier.verify( check, CheckTestUtils.getTestFile("puppet/license/valid-spdx/metadata.json")) .next().startAtLine(5).startAtColumn(14).endAtLine(5).endAtColumn(24).withMessage("Set the license to \"blabla\".") .noMore(); }