IncludeValidationHelper { public void checkBinIncludesExist(MavenProject project, BuildProperties buildProperties, boolean strict, String... ignoredIncludes) throws MojoExecutionException { checkIncludesExist("bin.includes", buildProperties.getBinIncludes(), project, strict, ignoredIncludes); } IncludeValidationHelper();  IncludeValidationHelper(Logger log); void checkBinIncludesExist(MavenProject project, BuildProperties buildProperties, boolean strict,
            String... ignoredIncludes); void checkSourceIncludesExist(MavenProject project, BuildProperties buildProperties, boolean strict);  }
@Test public void testCheckBinIncludesExistAntPatterns() throws Exception { BuildPropertiesImpl buildProperties = createBuildProperties("bin.includes", "foo.txt, bar*,**/*.me"); subject.checkBinIncludesExist(createMockProject(), buildProperties, true); }
@Test public void testCheckBinIncludesDontExist() throws Exception { BuildPropertiesImpl buildProperties = createBuildProperties("bin.includes", "foo2.txt, bar2*,**/*.me"); try { subject.checkBinIncludesExist(createMockProject(), buildProperties, true); fail(); } catch (MojoExecutionException e) { assertStringContains("bin.includes value(s) [foo2.txt, bar2*] do not match any files.", e.getMessage()); } }
@Test public void testCheckBinIncludesNotSpecified() throws Exception { BuildPropertiesImpl buildProperties = createBuildProperties("no.bin.includes", "bin.includes is not specified"); try { subject.checkBinIncludesExist(createMockProject(), buildProperties, true); fail(); } catch (MojoExecutionException e) { assertStringContains("bin.includes value(s) must be specified", e.getMessage()); } }
@Test public void testCheckBinIncludesExistWithIgnoredPatterns() throws Exception { BuildPropertiesImpl buildProperties = createBuildProperties("bin.includes", "foo.txt, bar*,**/*.me,TO_BE_IGNORED"); subject.checkBinIncludesExist(createMockProject(), buildProperties, true, "TO_BE_IGNORED"); }