コード例 #1
0
 @Test
 public void testExecuteSkip() throws MojoExecutionException {
   JacocoReportChangesMojo mojo =
       new JacocoReportChangesMojo() {
         public List<String> loadIncludes() throws MojoExecutionException {
           fail();
           return null;
         };
       };
   mojo.setJacocoSkip(true);
   mojo.execute();
 }
コード例 #2
0
 @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());
 }