@Test public void finsishedShouldProduceMessageForClassesTotalZero() { ArgumentCaptor<CharSequence> logCaptor = ArgumentCaptor.forClass( CharSequence.class ); Log log = mock( Log.class ); MinijarFilter m = new MinijarFilter( 0, 0, log ); m.finished(); verify( log, times( 1 ) ).info( logCaptor.capture() ); assertEquals( "Minimized 0 -> 0", logCaptor.getValue() ); }
public void finished() { int classesTotal = classesRemoved + classesKept; if ( classesTotal != 0 ) { log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" ); } else { log.info( "Minimized " + classesTotal + " -> " + classesKept ); } }
MinijarFilter implements Filter { public void finished() { int classesTotal = classesRemoved + classesKept; if ( classesTotal != 0 ) { log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" ); } else { log.info( "Minimized " + classesTotal + " -> " + classesKept ); } } }
MinijarFilter implements Filter { public void finished() { int classesTotal = classesRemoved + classesKept; if ( classesTotal != 0 ) { log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" ); } else { log.info( "Minimized " + classesTotal + " -> " + classesKept ); } } MinijarFilter( int classesKept, int classesRemoved, Log log );  MinijarFilter( MavenProject project, Log log );  MinijarFilter( MavenProject project, Log log, List<SimpleFilter> simpleFilters ); }
MinijarFilter implements Filter { public void finished() { int classesTotal = classesRemoved + classesKept; if ( classesTotal != 0 ) { log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" ); } else { log.info( "Minimized " + classesTotal + " -> " + classesKept ); } } MinijarFilter( int classesKept, int classesRemoved, Log log );  MinijarFilter( MavenProject project, Log log );  MinijarFilter( MavenProject project, Log log, List<SimpleFilter> simpleFilters ); boolean canFilter( File jar ); boolean isFiltered( String classFile ); void finished(); }
MinijarFilter implements Filter { public void finished() { int classesTotal = classesRemoved + classesKept; if ( classesTotal != 0 ) { log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" ); } else { log.info( "Minimized " + classesTotal + " -> " + classesKept ); } } MinijarFilter( int classesKept, int classesRemoved, Log log );  MinijarFilter( MavenProject project, Log log );  MinijarFilter( MavenProject project, Log log, List<SimpleFilter> simpleFilters ); boolean canFilter( File jar ); boolean isFiltered( String classFile ); void finished();  }