Exemple #1
0
        public void NormalLambda()
        {
            var ts = new TestSubscriber <int>();

            ts.OnSubscribe(new BooleanSubscription());

            Flowable.Range(1, 10)
            .BlockingSubscribe(ts.OnNext, ts.OnError, ts.OnComplete);

            ts.AssertResult(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        }
Exemple #2
0
        public void NormalLambdaAsync()
        {
            var ts = new TestSubscriber <int>();

            ts.OnSubscribe(new BooleanSubscription());

            Flowable.Range(1, 10)
            .Delay(TimeSpan.FromMilliseconds(10))
            .BlockingSubscribe(ts.OnNext, ts.OnError, ts.OnComplete);

            ts.AssertResult(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        }