Пример #1
0
 public void ILoggerExceptionInInitialize()
 {
     Assert.Throws <StackOverflowException>(() =>
     {
         LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new StackOverflowException());
         _initializedService.RegisterLogger(exceptionLogger);
     }
                                            );
 }
Пример #2
0
 public void GeneralExceptionInInitialize()
 {
     Assert.Throws <InternalLoggerException>(() =>
     {
         LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception());
         _initializedService.RegisterLogger(exceptionLogger);
     }
                                             );
 }
Пример #3
0
        public void ShutDownComponentExceptionsInLogger()
        {
            LoggerThrowException logger = new LoggerThrowException(true, false, new LoggerException("Hello"));

            VerifyShutdownExceptions(logger, null, typeof(LoggerException));

            logger = new LoggerThrowException(true, false, new Exception("boo"));
            VerifyShutdownExceptions(logger, null, typeof(InternalLoggerException));

            logger = new LoggerThrowException(true, false, new StackOverflowException());
            VerifyShutdownExceptions(logger, null, typeof(StackOverflowException));

            Assert.Equal(_initializedService.ServiceState, LoggingServiceState.Shutdown);
        }
Пример #4
0
 public void ILoggerExceptionInInitialize()
 {
     Assert.Throws<StackOverflowException>(() =>
     {
         LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new StackOverflowException());
         _initializedService.RegisterLogger(exceptionLogger);
     }
    );
 }
Пример #5
0
 public void GeneralExceptionInInitialize()
 {
     Assert.Throws<InternalLoggerException>(() =>
     {
         LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception());
         _initializedService.RegisterLogger(exceptionLogger);
     }
    );
 }
Пример #6
0
        public void ShutDownComponentExceptionsInLogger()
        {
            LoggerThrowException logger = new LoggerThrowException(true, false, new LoggerException("Hello"));
            VerifyShutdownExceptions(logger, null, typeof(LoggerException));

            logger = new LoggerThrowException(true, false, new Exception("boo"));
            VerifyShutdownExceptions(logger, null, typeof(InternalLoggerException));

            logger = new LoggerThrowException(true, false, new StackOverflowException());
            VerifyShutdownExceptions(logger, null, typeof(StackOverflowException));

            Assert.Equal(_initializedService.ServiceState, LoggingServiceState.Shutdown);
        }
Пример #7
0
 public void GeneralExceptionInInitialize()
 {
     LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception());
     _initializedService.RegisterLogger(exceptionLogger);
 }
Пример #8
0
        public void GeneralExceptionInInitialize()
        {
            LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception());

            _initializedService.RegisterLogger(exceptionLogger);
        }