@Test public void testSetCurrentPage() { doNothing().when(this.populatedAssetsScreen).update(); this.populatedAssetsScreen.setTotalPages(20, 15); this.populatedAssetsScreen.setCurrentPage(1); this.populatedAssetsScreen.setCurrentPage(10); verify(this.populatedAssetsScreen, times(1)).update(); verify(this.view, times(1)).setCurrentPage(anyInt()); }
public void setCurrentPage(Integer currentPage) { if (currentPage <= this.getTotalPages() && currentPage > 0) { this.currentPage = currentPage; update(); } else { this.view.setCurrentPage(this.currentPage); } }
PopulatedAssetsScreen { public void setCurrentPage(Integer currentPage) { if (currentPage <= this.getTotalPages() && currentPage > 0) { this.currentPage = currentPage; update(); } else { this.view.setCurrentPage(this.currentPage); } } }
PopulatedAssetsScreen { public void setCurrentPage(Integer currentPage) { if (currentPage <= this.getTotalPages() && currentPage > 0) { this.currentPage = currentPage; update(); } else { this.view.setCurrentPage(this.currentPage); } } @Inject  PopulatedAssetsScreen(final PopulatedAssetsScreen.View view,
                                 final CategoriesManagerCache categoriesManagerCache,
                                 final ResourceTypeManagerCache resourceTypeManagerCache,
                                 final BusyIndicatorView busyIndicatorView,
                                 final LibraryPlaces libraryPlaces,
                                 final TranslationService ts,
                                 final Classifier assetClassifier,
                                 final ManagedInstance<AssetItemWidget> assetItemWidget,
                                 final NewFileUploader newFileUploader,
                                 final NewResourcePresenter newResourcePresenter,
                                 final ProjectController projectController,
                                 final Event<UpdatedAssetsEvent> updatedAssetsEventEvent,
                                 final EmptyState emptyState,
                                 final CategoryUtils categoryUtils,
                                 final DateUtils dateUtils,
                                 final AssetQueryService assetQueryService,
                                 final Event<WorkspaceProjectContextChangeEvent> contextChangeEvent,
                                 final Promises promises); }
PopulatedAssetsScreen { public void setCurrentPage(Integer currentPage) { if (currentPage <= this.getTotalPages() && currentPage > 0) { this.currentPage = currentPage; update(); } else { this.view.setCurrentPage(this.currentPage); } } @Inject  PopulatedAssetsScreen(final PopulatedAssetsScreen.View view,
                                 final CategoriesManagerCache categoriesManagerCache,
                                 final ResourceTypeManagerCache resourceTypeManagerCache,
                                 final BusyIndicatorView busyIndicatorView,
                                 final LibraryPlaces libraryPlaces,
                                 final TranslationService ts,
                                 final Classifier assetClassifier,
                                 final ManagedInstance<AssetItemWidget> assetItemWidget,
                                 final NewFileUploader newFileUploader,
                                 final NewResourcePresenter newResourcePresenter,
                                 final ProjectController projectController,
                                 final Event<UpdatedAssetsEvent> updatedAssetsEventEvent,
                                 final EmptyState emptyState,
                                 final CategoryUtils categoryUtils,
                                 final DateUtils dateUtils,
                                 final AssetQueryService assetQueryService,
                                 final Event<WorkspaceProjectContextChangeEvent> contextChangeEvent,
                                 final Promises promises); @PostConstruct void init(); void onAssetListUpdated(@Observes @Routed ProjectAssetListUpdated event); void importAsset(); void setFilterType(String filterType); void showSearchHitNothing(); void showEmptyState(String title,
                               String message); void hideEmptyState(); void addAsset(); void nextPage(); void prevPage(); void setCurrentPage(Integer currentPage); void search(String filterText); View getView(); }
PopulatedAssetsScreen { public void setCurrentPage(Integer currentPage) { if (currentPage <= this.getTotalPages() && currentPage > 0) { this.currentPage = currentPage; update(); } else { this.view.setCurrentPage(this.currentPage); } } @Inject  PopulatedAssetsScreen(final PopulatedAssetsScreen.View view,
                                 final CategoriesManagerCache categoriesManagerCache,
                                 final ResourceTypeManagerCache resourceTypeManagerCache,
                                 final BusyIndicatorView busyIndicatorView,
                                 final LibraryPlaces libraryPlaces,
                                 final TranslationService ts,
                                 final Classifier assetClassifier,
                                 final ManagedInstance<AssetItemWidget> assetItemWidget,
                                 final NewFileUploader newFileUploader,
                                 final NewResourcePresenter newResourcePresenter,
                                 final ProjectController projectController,
                                 final Event<UpdatedAssetsEvent> updatedAssetsEventEvent,
                                 final EmptyState emptyState,
                                 final CategoryUtils categoryUtils,
                                 final DateUtils dateUtils,
                                 final AssetQueryService assetQueryService,
                                 final Event<WorkspaceProjectContextChangeEvent> contextChangeEvent,
                                 final Promises promises); @PostConstruct void init(); void onAssetListUpdated(@Observes @Routed ProjectAssetListUpdated event); void importAsset(); void setFilterType(String filterType); void showSearchHitNothing(); void showEmptyState(String title,
                               String message); void hideEmptyState(); void addAsset(); void nextPage(); void prevPage(); void setCurrentPage(Integer currentPage); void search(String filterText); View getView();  }