public void ILoggerExceptionInInitialize() { Assert.Throws <StackOverflowException>(() => { LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new StackOverflowException()); _initializedService.RegisterLogger(exceptionLogger); } ); }
public void GeneralExceptionInInitialize() { Assert.Throws <InternalLoggerException>(() => { LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception()); _initializedService.RegisterLogger(exceptionLogger); } ); }
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); }
public void ILoggerExceptionInInitialize() { Assert.Throws<StackOverflowException>(() => { LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new StackOverflowException()); _initializedService.RegisterLogger(exceptionLogger); } ); }
public void GeneralExceptionInInitialize() { Assert.Throws<InternalLoggerException>(() => { LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception()); _initializedService.RegisterLogger(exceptionLogger); } ); }
public void GeneralExceptionInInitialize() { LoggerThrowException exceptionLogger = new LoggerThrowException(false, true, new Exception()); _initializedService.RegisterLogger(exceptionLogger); }