public void WrongMyTargetShouldNotThrowExceptionWhenThrowExceptionsIsFalse() { var target = new WrongMyTarget(); LogManager.ThrowExceptions = false; SimpleConfigurator.ConfigureForTargetLogging(target); var logger = LogManager.GetLogger("WrongMyTargetShouldThrowException"); logger.Info("Testing"); }
public void WrongMyTargetShouldThrowException() { Assert.Throws <NLogRuntimeException>(() => { var target = new WrongMyTarget(); LogManager.ThrowExceptions = true; SimpleConfigurator.ConfigureForTargetLogging(target); var logger = LogManager.GetLogger("WrongMyTargetShouldThrowException"); logger.Info("Testing"); }); }
public void WrongMyTargetShouldNotThrowExceptionWhenThrowExceptionsIsFalse() { var target = new WrongMyTarget(); LogManager.ThrowExceptions = false; SimpleConfigurator.ConfigureForTargetLogging(target); var logger = LogManager.GetLogger("WrongMyTargetShouldThrowException"); logger.Info("Testing"); var layouts = target.GetAllLayouts(); Assert.NotNull(layouts); }
public void WrongMyTargetShouldThrowException() { Assert.Throws<NLogRuntimeException>(() => { var target = new WrongMyTarget(); LogManager.ThrowExceptions = true; SimpleConfigurator.ConfigureForTargetLogging(target); var logger = LogManager.GetLogger("WrongMyTargetShouldThrowException"); logger.Info("Testing"); }); }