@Test public void testExecuteSkip() throws MojoExecutionException { JacocoReportChangesMojo mojo = new JacocoReportChangesMojo() { public List<String> loadIncludes() throws MojoExecutionException { fail(); return null; }; }; mojo.setJacocoSkip(true); mojo.execute(); }
@Test public void testCanGenerateReportReturnsFalseWhenSuperReturnsFalse() throws MojoExecutionException { final List<String> changedFiles = Arrays.asList("a", "b", "c"); JacocoReportChangesMojo mojo = new JacocoReportChangesMojo() { public java.util.List<String> loadIncludes() throws MojoExecutionException { return changedFiles; }; }; mojo.setJacocoSkip(true); mojo.injectDefaults(); assertFalse(mojo.canGenerateReport()); }