public void do_nothing_if_it_is_not_the_right_exception()
 {
     var handler = new MoveToErrorQueueHandler<NotImplementedException>();
     handler.DetermineContinuation(null, new Exception()).ShouldBeNull();
     handler.DetermineContinuation(null, new ApplicationException()).ShouldBeNull();
     handler.DetermineContinuation(null, new NotSupportedException()).ShouldBeNull();
 }
        public void moves_to_the_error_queue_if_the_exception_matches()
        {
            var handler = new MoveToErrorQueueHandler<NotImplementedException>();
            var ex = new NotImplementedException();

            handler.DetermineContinuation(null, ex).ShouldBeOfType<MoveToErrorQueue>()
                .Exception.ShouldBeTheSameAs(ex);
        }
Beispiel #3
0
        public void do_nothing_if_it_is_not_the_right_exception()
        {
            var handler = new MoveToErrorQueueHandler <NotImplementedException>();

            handler.DetermineContinuation(null, new Exception()).ShouldBeNull();
            handler.DetermineContinuation(null, new DivideByZeroException()).ShouldBeNull();
            handler.DetermineContinuation(null, new NotSupportedException()).ShouldBeNull();
        }
Beispiel #4
0
        public void moves_to_the_error_queue_if_the_exception_matches()
        {
            var handler = new MoveToErrorQueueHandler <NotImplementedException>();
            var ex      = new NotImplementedException();

            handler.DetermineContinuation(null, ex).ShouldBeOfType <MoveToErrorQueue>()
            .Exception.ShouldBeTheSameAs(ex);
        }
Beispiel #5
0
            public ThenContinueExpression MoveToErrorQueue()
            {
                var handler = new MoveToErrorQueueHandler <T>();

                _handler.Value.AddContinuation(handler);

                return(this);
            }