@Test public void testReuse() { final ReportState mock = mock( ReportState.class ); when( mock.getCurrentRow() ).thenReturn( 1 ); when( mock.getNumberOfRows() ).thenReturn( 1 ); when( mock.getLevel() ).thenReturn( 1 ); final ReportProgressEvent event = new ReportProgressEvent( "test" ); assertEquals( -1, event.getTotalPages() ); event.reuse( ReportProgressEvent.PRECOMPUTING_VALUES, mock, 0 ); assertEquals( -1, event.getTotalPages() ); event.reuse( ReportProgressEvent.PAGINATING, mock, 100 ); assertEquals( -1, event.getTotalPages() ); event.reuse( ReportProgressEvent.GENERATING_CONTENT, mock, 100, 150 ); assertEquals( 150, event.getTotalPages() ); event.reuse( ReportProgressEvent.PAGINATING, mock, 100 ); assertEquals( 150, event.getTotalPages() ); }
public void reuse( final int activity, final ReportState rawState, final int pageCount ) { reuse( activity, rawState, pageCount, this.totalPages ); }
ReportProgressEvent extends EventObject implements Cloneable { public void reuse( final int activity, final ReportState rawState, final int pageCount ) { reuse( activity, rawState, pageCount, this.totalPages ); } }
ReportProgressEvent extends EventObject implements Cloneable { public void reuse( final int activity, final ReportState rawState, final int pageCount ) { reuse( activity, rawState, pageCount, this.totalPages ); } ReportProgressEvent( final Object source ); @Deprecated  ReportProgressEvent( final Object source, final int page );  ReportProgressEvent( final Object source, final int page, final int totalPages ); @Deprecated  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
      final int page, final int level, final int maximumLevel );  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
                              final int page, final int totalPages, final int level, final int maximumLevel ); }
ReportProgressEvent extends EventObject implements Cloneable { public void reuse( final int activity, final ReportState rawState, final int pageCount ) { reuse( activity, rawState, pageCount, this.totalPages ); } ReportProgressEvent( final Object source ); @Deprecated  ReportProgressEvent( final Object source, final int page );  ReportProgressEvent( final Object source, final int page, final int totalPages ); @Deprecated  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
      final int page, final int level, final int maximumLevel );  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
                              final int page, final int totalPages, final int level, final int maximumLevel ); String toString(); int getRow(); int getActivity(); int getPage(); int getTotalPages(); int getMaximumRow(); int getMaximumLevel(); int getLevel(); void reuse( final int activity, final ReportState rawState, final int pageCount ); void reuse( final int activity, final ReportState rawState, final int pageCount, final int totalPages ); void reuse( final int activity, final int row, final int maximumRow, final int page, final int level,
      final int maximumLevel ); void reuse( final int activity, final int row, final int maximumRow, final int page, final int totalPages, final int level,
                     final int maximumLevel ); Object clone(); static double computePercentageComplete( final ReportProgressEvent event, final boolean onlyPagination ); }
ReportProgressEvent extends EventObject implements Cloneable { public void reuse( final int activity, final ReportState rawState, final int pageCount ) { reuse( activity, rawState, pageCount, this.totalPages ); } ReportProgressEvent( final Object source ); @Deprecated  ReportProgressEvent( final Object source, final int page );  ReportProgressEvent( final Object source, final int page, final int totalPages ); @Deprecated  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
      final int page, final int level, final int maximumLevel );  ReportProgressEvent( final Object source, final int activity, final int row, final int maximumRow,
                              final int page, final int totalPages, final int level, final int maximumLevel ); String toString(); int getRow(); int getActivity(); int getPage(); int getTotalPages(); int getMaximumRow(); int getMaximumLevel(); int getLevel(); void reuse( final int activity, final ReportState rawState, final int pageCount ); void reuse( final int activity, final ReportState rawState, final int pageCount, final int totalPages ); void reuse( final int activity, final int row, final int maximumRow, final int page, final int level,
      final int maximumLevel ); void reuse( final int activity, final int row, final int maximumRow, final int page, final int totalPages, final int level,
                     final int maximumLevel ); Object clone(); static double computePercentageComplete( final ReportProgressEvent event, final boolean onlyPagination ); static final int COMPUTING_LAYOUT; static final int PRECOMPUTING_VALUES; static final int PAGINATING; static final int GENERATING_CONTENT; }