Skip to content

Fixes for Count Side Effect Operators

Compare
Choose a tag to compare
@thomasnield thomasnield released this 27 Nov 00:33
· 8 commits to 2.x since this release

This release contains bug fixes for the doOnNextCount(), doOnErrorCount(), and doOnCompleteCount() transformers as well as their FX counterparts doOnNextCountFx(), doOnErrorCountFx(), and doOnCompleteCountFx().

Unit tests have been added for these operators as well.

       List<Integer> onNextCounts = new ArrayList<>();

        Observable.just("Alpha", "Beta", "Gamma")
                .compose(FxObservableTransformers.doOnNextCount(onNextCounts::add))
                .subscribe();

        Assert.assertTrue(onNextCounts.containsAll(Arrays.asList(1, 2, 3)));