public void SetUp() { this.documentStore = new EmbeddableDocumentStore { Configuration = { RunInUnreliableYetFastModeThatIsNotSuitableForProduction = true, RunInMemory = true, } }; /* * // For integration testing * this.documentStore = new DocumentStore * { * Url = "http://raven", * DefaultDatabase = "Log" * }; */ this.documentStore.Initialize(); this.documentSession = this.documentStore.OpenSession(); this.appender = new RavenAppender(this.documentStore); }
public void SmokeIntegrationalTest() { Config.XmlConfigurator.Configure(); var logger = LogManager.GetLogger(this.GetType()); var appenders = logger.Logger.Repository.GetAppenders(); Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue(appenders.Length > 0, "Seems that Raven Appender is not configured"); this.appender = appenders[0] as RavenAppender; Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotNull(appender, "Raven Appender is expected to be the only one configured for tests"); // Assert TraceInfro trace = new TraceInfro() { Info = "Log Info" }; logger.Info(trace); logger.Warn("Log Warning"); logger.Error("Log Warning", new Exception("Something wrong happened", new UserException())); LogManager.Shutdown(); }
public void SetUp() { this.documentStore = new EmbeddableDocumentStore { Configuration = { RunInUnreliableYetFastModeThatIsNotSuitableForProduction = true, RunInMemory = true, } }; /* // For integration testing this.documentStore = new DocumentStore { Url = "http://raven", DefaultDatabase = "Log" }; */ this.documentStore.Initialize(); this.documentSession = this.documentStore.OpenSession(); this.appender = new RavenAppender(this.documentStore); }
public void SetUp() { this.documentStore = new EmbeddableDocumentStore { Configuration = { RunInUnreliableYetFastModeThatIsNotSuitableForProduction = true, RunInMemory = true, } }; this.documentStore.Initialize(); this.documentSession = this.documentStore.OpenSession(); this.appender = new RavenAppender(this.documentStore); }
public void SmokeIntegrationalTest() { Config.XmlConfigurator.Configure(); var logger = LogManager.GetLogger(this.GetType()); var appenders = logger.Logger.Repository.GetAppenders(); Assert.IsTrue(appenders.Length > 0, "Seems that Raven Appender is not configured"); this.appender = appenders[0] as RavenAppender; Assert.IsNotNull(appender, "Raven Appender is expected to be the only one configured for tests"); // Assert logger.Info("Log Info"); logger.Warn("Log Warning"); logger.Error("Log Warning", new Exception("Something wrong happened", new UserException())); LogManager.Shutdown(); }