use of com.google.android.material.behavior.SwipeDismissBehavior in project RxBinding by JakeWharton.
the class RxSwipeDismissBehaviorTest method dismisses.
@Test
public void dismisses() {
((CoordinatorLayout.LayoutParams) view.getLayoutParams()).setBehavior(new SwipeDismissBehavior());
RecordingObserver<View> o = new RecordingObserver<>();
RxSwipeDismissBehavior.dismisses(view).subscribeOn(AndroidSchedulers.mainThread()).subscribe(o);
// No initial value.
o.assertNoMoreEvents();
onView(withId(1)).perform(swipeRight());
assertEquals(view, o.takeNext());
o.dispose();
onView(withId(1)).perform(swipeRight());
o.assertNoMoreEvents();
}
Aggregations