public void LightNodeEventSourceLogging() { var listener = new MockEventListener(); listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways); var testServer = TestServer.Create(app => { var option = new LightNodeOptions { Logger = LightNode.Diagnostics.LightNodeEventSource.Log }; app.UseLightNode(option, typeof(MockEnv).Assembly); }); (listener.EventList.Count > 0).IsTrue(); }
public void LightNodeEventSourceLogging() { var listener = new MockEventListener(); listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways); var testServer = TestServer.Create((Action <Owin.IAppBuilder>)(app => { var option = new LightNodeOptions { Logger = LightNode.Diagnostics.LightNodeEventSource.Log }; Owin.AppBuilderLightNodeMiddlewareExtensions.UseLightNode(app, option, typeof(MockEnv).Assembly); })); (listener.EventList.Count > 0).IsTrue(); }