public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            var step = _ioDispatcher.BeginReadBackward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => _hasRead    = true,
                () => _hasTimedOut = true
                );

            IODispatcherAsync.Run(step);
            _cancellationScope.Cancel();
        }
Example #2
0
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            var step = _ioDispatcher.BeginReadForward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => _result     = res,
                () => _hasTimedOut = true
                );

            IODispatcherAsync.Run(step);

            _readForward.Envelope.ReplyWith(CreateReadStreamEventsForwardCompleted(_readForward));
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            var mre  = new ManualResetEvent(false);
            var step = _ioDispatcher.BeginReadForward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => { _hasRead = true; mre.Set(); },
                () => { _hasTimedOut = true; mre.Set(); }
                );

            IODispatcherAsync.Run(step);
            _cancellationScope.Cancel();
            _eventSet = mre.WaitOne(TimeSpan.FromSeconds(5));
        }
Example #4
0
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();

            var step = _ioDispatcher.BeginReadForward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => _didReceiveRead = true,
                () => _didTimeout      = true
                );

            IODispatcherAsync.Run(step);
            Assert.IsNotNull(_timeoutMessage, "Expected TimeoutMessage to not be null");

            _timeoutMessage.Reply();
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            var mre  = new ManualResetEvent(false);
            var step = _ioDispatcher.BeginReadForward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => { _result = res; mre.Set(); },
                () => { _hasTimedOut = true; mre.Set(); }
                );

            IODispatcherAsync.Run(step);

            _readForward.Envelope.ReplyWith(CreateReadStreamEventsForwardCompleted(_readForward));
            mre.WaitOne(TimeSpan.FromSeconds(10));
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            var mre  = new ManualResetEvent(false);
            var step = _ioDispatcher.BeginReadBackward(
                _cancellationScope, _eventStreamId, _fromEventNumber, _maxCount, true, _principal,
                res => { _didReceiveRead = true; mre.Set(); },
                () => { _didTimeout = true; mre.Set(); }
                );

            IODispatcherAsync.Run(step);
            Assert.IsNotNull(_timeoutMessage, "Expected TimeoutMessage to not be null");

            _timeoutMessage.Reply();
            mre.WaitOne(TimeSpan.FromSeconds(10));
        }