Exemplo n.º 1
0
    public void ShouldHandleFatalException()
    {
        var causeException = new Exception();
        var evt            = new StubEvent(0);

        var exceptionHandler = new FatalExceptionHandler <StubEvent>();

        var exception = Assert.Throws <ApplicationException>(() => exceptionHandler.HandleEventException(causeException, 0L, evt));

        Assert.IsNotNull(exception);
        Assert.AreEqual(causeException, exception !.InnerException);
    }
Exemplo n.º 2
0
        public void ShouldHandleFatalException()
        {
            var causeException = new Exception();
            var evt            = new StubEvent(0);

            var exceptionHandler = new FatalExceptionHandler();

            try
            {
                exceptionHandler.HandleEventException(causeException, 0L, evt);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(causeException, ex.InnerException);
            }
        }
        public void ShouldHandleFatalException()
        {
            var causeException = new Exception();
            var evt = new StubEvent(0);

            var exceptionHandler = new FatalExceptionHandler();

            try
            {
                exceptionHandler.HandleEventException(causeException, 0L, evt);
            }
            catch (Exception ex)
            {
                Assert.AreEqual(causeException, ex.InnerException);
            }
        }