@Test public void throwInvalidException() throws Exception { notificationSettingsInteractor.notificationSettings.onNext(null); Sync.wrap(notificationSettingsInteractor.enableAll()) .assertThrows(NotificationSettingsInteractor.InvalidException.class); notificationSettingsInteractor.notificationSettings.onNext(new ArrayList<>()); Sync.wrap(notificationSettingsInteractor.enableAll()) .assertThrows(NotificationSettingsInteractor.InvalidException.class); }
public Observable<VoidResponse> enableAll() { return latest().map(this::enableAll) .flatMap(this::updateNotificationSettings); }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public Observable<VoidResponse> enableAll() { return latest().map(this::enableAll) .flatMap(this::updateNotificationSettings); } }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public Observable<VoidResponse> enableAll() { return latest().map(this::enableAll) .flatMap(this::updateNotificationSettings); }  }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public Observable<VoidResponse> enableAll() { return latest().map(this::enableAll) .flatMap(this::updateNotificationSettings); }  Observable<VoidResponse> updateNotificationSettings(@NonNull final List<NotificationSetting> settings); Observable<VoidResponse> enableAll(); Observable<VoidResponse> disableAll(); boolean updateIfInvalid(); }
NotificationSettingsInteractor extends ValueInteractor<ArrayList<NotificationSetting>> { public Observable<VoidResponse> enableAll() { return latest().map(this::enableAll) .flatMap(this::updateNotificationSettings); }  Observable<VoidResponse> updateNotificationSettings(@NonNull final List<NotificationSetting> settings); Observable<VoidResponse> enableAll(); Observable<VoidResponse> disableAll(); boolean updateIfInvalid(); final InteractorSubject<ArrayList<NotificationSetting>> notificationSettings; }