Example #1
0
        public void ZipTest_DifferentLength()
        {
            TestSubscriber <int> ts = new TestSubscriber <int>();

            Flowable.Zip(Flowable.Range(1, 3), Flowable.Range(10, 2), (a, b) => a + b).Subscribe(ts);

            ts.AssertValues(11, 13)
            .AssertComplete()
            .AssertNoError();
        }
Example #2
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();
        }
Example #3
0
        public void ZipTest_SameLength()
        {
            TestSubscriber <int> ts = new TestSubscriber <int>();

            Flowable.Zip(Flowable.Just(1), Flowable.Just(2), (a, b) => a + b).Subscribe(ts);

            ts.AssertValue(3)
            .AssertComplete()
            .AssertNoError();
        }
 public override IPublisher <int> CreatePublisher(long elements)
 {
     return(Flowable.Zip(Flowable.Range(1, (int)elements).Hide(), Flowable.Range(1, (int)elements + 1).Hide(), (a, b) => a + b));
 }
Example #5
0
 public void Normal5Hide()
 {
     Flowable.Zip(Flowable.Range(1, 2).Hide(), Flowable.Empty <int>().Hide(), (a, b) => a + b)
     .Test()
     .AssertResult();
 }
Example #6
0
 public void Normal3Hide()
 {
     Flowable.Zip(Flowable.Range(1, 3).Hide(), Flowable.Range(1, 2).Hide(), (a, b) => a + b)
     .Test()
     .AssertResult(2, 4);
 }