コード例 #1
0
        private static void ValidateProbe(TestSubscriber.ManualProbe<int> probe, int requests, IEnumerable<int> result)
        {
            var subscription = probe.ExpectSubscription();

            var collected = Enumerable.Range(1, requests).Select(_ =>
            {
                subscription.Request(1);
                return probe.ExpectNext();
            });

            collected.ShouldAllBeEquivalentTo(result);
            probe.ExpectComplete();
        }