Esempio n. 1
0
 public void Empty()
 {
     Flowable.Empty <int>()
     .DefaultIfEmpty(1)
     .Test()
     .AssertResult(1);
 }
Esempio n. 2
0
 public void Zero2()
 {
     Flowable.Empty <int>()
     .Parallel(2)
     .Sequential()
     .Test()
     .AssertResult();
 }
Esempio n. 3
0
        IEnumerable <IFlowable <int> > Sequence(long elements)
        {
            yield return(Flowable.Empty <int>());

            yield return(Flowable.Empty <int>());

            yield return(Flowable.Range(1, (int)elements));
        }
Esempio n. 4
0
 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));
 }
Esempio n. 5
0
 public void EmptyBackpressured()
 {
     Flowable.Empty <int>()
     .DefaultIfEmpty(1)
     .Test(0)
     .AssertEmpty()
     .RequestMore(1)
     .AssertResult(1);
 }
Esempio n. 6
0
        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)));
 }
Esempio n. 10
0
 public override IPublisher <int> CreatePublisher(long elements)
 {
     return(Flowable.Empty <int>().SwitchIfEmpty(Sequence(elements)));
 }
Esempio n. 11
0
 public void Normal5Hide()
 {
     Flowable.Zip(Flowable.Range(1, 2).Hide(), Flowable.Empty <int>().Hide(), (a, b) => a + b)
     .Test()
     .AssertResult();
 }