@Test public void testTextViewIsUpdatedWhenValueComes() { TextView textView = mock(TextView.class); Observable<String> observable = Observable.just("String"); SubscriptionUtils.subscribeTextViewText(observable, textView); verify(textView).setText(eq("String")); }
@NonNull public static Disposable subscribeTextViewText(@NonNull final Observable<String> observable, @NonNull final TextView textView) { return subscribeTextViewText(observable, textView, AndroidSchedulers.mainThread()); }
SubscriptionUtils { @NonNull public static Disposable subscribeTextViewText(@NonNull final Observable<String> observable, @NonNull final TextView textView) { return subscribeTextViewText(observable, textView, AndroidSchedulers.mainThread()); } }
SubscriptionUtils { @NonNull public static Disposable subscribeTextViewText(@NonNull final Observable<String> observable, @NonNull final TextView textView) { return subscribeTextViewText(observable, textView, AndroidSchedulers.mainThread()); } private  SubscriptionUtils(); }
SubscriptionUtils { @NonNull public static Disposable subscribeTextViewText(@NonNull final Observable<String> observable, @NonNull final TextView textView) { return subscribeTextViewText(observable, textView, AndroidSchedulers.mainThread()); } private  SubscriptionUtils(); @NonNull static Disposable subscribeTextViewText(@NonNull final Observable<String> observable,
                                                   @NonNull final TextView textView); @NonNull static Disposable subscribeTextViewText(@NonNull final Observable<String> observable,
                                                   @NonNull final TextView textView,
                                                   @NonNull final Scheduler scheduler); }
SubscriptionUtils { @NonNull public static Disposable subscribeTextViewText(@NonNull final Observable<String> observable, @NonNull final TextView textView) { return subscribeTextViewText(observable, textView, AndroidSchedulers.mainThread()); } private  SubscriptionUtils(); @NonNull static Disposable subscribeTextViewText(@NonNull final Observable<String> observable,
                                                   @NonNull final TextView textView); @NonNull static Disposable subscribeTextViewText(@NonNull final Observable<String> observable,
                                                   @NonNull final TextView textView,
                                                   @NonNull final Scheduler scheduler);  }