public void Required_spec104_mustCallOnErrorOnAllItsSubscribersIfItEncountersANonRecoverableError()
        => OptionalMultipleSubscribersTest(2, setup =>
        {
            var sub1 = new ManualSubscriberWithErrorCollection <T>(_environment);
            _environment.Subscribe(setup.Processor, sub1);

            var sub2 = new ManualSubscriberWithErrorCollection <T>(_environment);
            _environment.Subscribe(setup.Processor, sub2);

            sub1.Request(1);
            setup.ExpectRequest();
            var x = setup.SendNextTFromUpstream();
            setup.ExpectNextElement(sub1, x);
            sub1.Request(1);

            // sub1 has received one element, and has one demand pending
            // sub2 has not yet requested anything

            var ex = new TestException();
            setup.SendError(ex);
            sub1.ExpectError(ex);
            sub2.ExpectError(ex);

            _environment.VerifyNoAsyncErrorsNoDelay();
        });
        public void MustImmediatelyPassOnOnErrorEventsReceivedFromItsUpstreamToItsDownstream()
        {
            var setup        = new TestSetup(_environment, _processorBufferSize, 1, this);
            var subscription = new ManualSubscriberWithErrorCollection <T>(_environment);

            _environment.Subscribe(setup.Processor, subscription);

            var ex = new TestException();

            setup.SendError(ex);
            subscription.ExpectError(ex); // "immediately", i.e. without a preceding request

            _environment.VerifyNoAsyncErrorsNoDelay();
        }