public void Empty() { Flowable.Empty <int>() .DefaultIfEmpty(1) .Test() .AssertResult(1); }
public void Zero2() { Flowable.Empty <int>() .Parallel(2) .Sequential() .Test() .AssertResult(); }
IEnumerable <IFlowable <int> > Sequence(long elements) { yield return(Flowable.Empty <int>()); yield return(Flowable.Empty <int>()); yield return(Flowable.Range(1, (int)elements)); }
public override IPublisher <int> CreatePublisher(long elements) { if (elements == 0) { return(Flowable.Empty <int>()); } return(Flowable.Range(1, (int)elements - 1).Scan(() => 1, (a, b) => a + b)); }
public void EmptyBackpressured() { Flowable.Empty <int>() .DefaultIfEmpty(1) .Test(0) .AssertEmpty() .RequestMore(1) .AssertResult(1); }
public void ZipTest_FirstEmpty() { TestSubscriber <int> ts = new TestSubscriber <int>(); Flowable.Zip(Flowable.Empty <int>(), Flowable.Just(2), (a, b) => a + b).Subscribe(ts); ts.AssertNoValues() .AssertComplete() .AssertNoError(); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Empty <int>()); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Empty <int>().Reduce((a, b) => a + b)); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Empty <int>().SwitchIfEmpty(Flowable.Range(1, (int)elements))); }
public override IPublisher <int> CreatePublisher(long elements) { return(Flowable.Empty <int>().SwitchIfEmpty(Sequence(elements))); }
public void Normal5Hide() { Flowable.Zip(Flowable.Range(1, 2).Hide(), Flowable.Empty <int>().Hide(), (a, b) => a + b) .Test() .AssertResult(); }