@Test public void updateIfInvalid() throws Exception { notificationSettingsInteractor.notificationSettings.forget(); notificationSettingsInteractor.notificationSettings.onNext(null); final boolean updated = notificationSettingsInteractor.updateIfInvalid(); assertThat(updated, equalTo(true)); assertThat(notificationSettingsInteractor.notificationSettings.hasValue(), equalTo(true)); }
public boolean updateIfInvalid() { if (isInvalid(notificationSettings.getValue())) { update(); return true; } else { return false; } }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public boolean updateIfInvalid() { if (isInvalid(notificationSettings.getValue())) { update(); return true; } else { return false; } } }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public boolean updateIfInvalid() { if (isInvalid(notificationSettings.getValue())) { update(); return true; } else { return false; } }  }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public boolean updateIfInvalid() { if (isInvalid(notificationSettings.getValue())) { update(); return true; } else { return false; } }  Observable<VoidResponse> updateNotificationSettings(@NonNull final List<NotificationSetting> settings); Observable<VoidResponse> enableAll(); Observable<VoidResponse> disableAll(); boolean updateIfInvalid(); }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public boolean updateIfInvalid() { if (isInvalid(notificationSettings.getValue())) { update(); return true; } else { return false; } }  Observable<VoidResponse> updateNotificationSettings(@NonNull final List<NotificationSetting> settings); Observable<VoidResponse> enableAll(); Observable<VoidResponse> disableAll(); boolean updateIfInvalid(); final InteractorSubject<ArrayList<NotificationSetting>> notificationSettings; }