@Test public void loadPreferencesTest() { presenter.loadPreferences(any(PaginatedArchetypeList.class)).catch_(i -> { Assert.fail("Promise should've been resolved!"); return promises.resolve(); }); verify(archetypePreferences).load(any(ParameterizedCommand.class), any(ParameterizedCommand.class)); }
@Override public Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList) { return promises.create( (resolve, reject) -> archetypePreferences.load(loadPreferencesSuccessCallback(paginatedList, resolve), loadPreferencesErrorCallback(reject))); }
GlobalArchetypeTablePresenter extends AbstractArchetypeTablePresenter { @Override public Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList) { return promises.create( (resolve, reject) -> archetypePreferences.load(loadPreferencesSuccessCallback(paginatedList, resolve), loadPreferencesErrorCallback(reject))); } }
GlobalArchetypeTablePresenter extends AbstractArchetypeTablePresenter { @Override public Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList) { return promises.create( (resolve, reject) -> archetypePreferences.load(loadPreferencesSuccessCallback(paginatedList, resolve), loadPreferencesErrorCallback(reject))); } @Inject  GlobalArchetypeTablePresenter(final View view,
                                         final ArchetypeListPresenter archetypeListPresenter,
                                         final BusyIndicatorView busyIndicatorView,
                                         final TranslationService ts,
                                         final AddArchetypeModalPresenter addArchetypeModalPresenter,
                                         final ArchetypePreferences archetypePreferences,
                                         final Caller<ArchetypeService> archetypeService,
                                         final PreferenceScopeFactory preferenceScopeFactory,
                                         final Promises promises,
                                         final AuthorizationManager authorizationManager,
                                         final User user); }
GlobalArchetypeTablePresenter extends AbstractArchetypeTablePresenter { @Override public Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList) { return promises.create( (resolve, reject) -> archetypePreferences.load(loadPreferencesSuccessCallback(paginatedList, resolve), loadPreferencesErrorCallback(reject))); } @Inject  GlobalArchetypeTablePresenter(final View view,
                                         final ArchetypeListPresenter archetypeListPresenter,
                                         final BusyIndicatorView busyIndicatorView,
                                         final TranslationService ts,
                                         final AddArchetypeModalPresenter addArchetypeModalPresenter,
                                         final ArchetypePreferences archetypePreferences,
                                         final Caller<ArchetypeService> archetypeService,
                                         final PreferenceScopeFactory preferenceScopeFactory,
                                         final Promises promises,
                                         final AuthorizationManager authorizationManager,
                                         final User user); @Override Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList); @Override Promise<Void> makeDefaultValue(final String alias,
                                          final boolean updateList); @Override ArchetypeTableConfiguration initConfiguration(); @Override boolean canMakeChanges(); @Override Promise<Void> savePreferences(final boolean updateList); }
GlobalArchetypeTablePresenter extends AbstractArchetypeTablePresenter { @Override public Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList) { return promises.create( (resolve, reject) -> archetypePreferences.load(loadPreferencesSuccessCallback(paginatedList, resolve), loadPreferencesErrorCallback(reject))); } @Inject  GlobalArchetypeTablePresenter(final View view,
                                         final ArchetypeListPresenter archetypeListPresenter,
                                         final BusyIndicatorView busyIndicatorView,
                                         final TranslationService ts,
                                         final AddArchetypeModalPresenter addArchetypeModalPresenter,
                                         final ArchetypePreferences archetypePreferences,
                                         final Caller<ArchetypeService> archetypeService,
                                         final PreferenceScopeFactory preferenceScopeFactory,
                                         final Promises promises,
                                         final AuthorizationManager authorizationManager,
                                         final User user); @Override Promise<Void> loadPreferences(final PaginatedArchetypeList paginatedList); @Override Promise<Void> makeDefaultValue(final String alias,
                                          final boolean updateList); @Override ArchetypeTableConfiguration initConfiguration(); @Override boolean canMakeChanges(); @Override Promise<Void> savePreferences(final boolean updateList);  }