void LogEndpoints() { _owinServer = WebServerStartup.Start(_endpoints); EnvironmentVariables.IsServerOnline = true; WriteLine("\r\nWeb Server Started"); foreach (var endpoint in _endpoints) { WriteLine($"Web server listening at {endpoint.Url}"); } }
public void WebServerStartup_Configuration_HttpListener_InitializedCorrectly() { //------------Setup for test-------------------------- var listener = new HttpListener(); Assert.AreEqual(AuthenticationSchemes.Anonymous, listener.AuthenticationSchemes); Assert.IsFalse(listener.IgnoreWriteExceptions); var app = new AppBuilder(); app.Properties.Add(typeof(HttpListener).FullName, listener); var webServerStartup = new WebServerStartup(); //------------Execute Test--------------------------- webServerStartup.Configuration(app); //------------Assert Results------------------------- Assert.AreEqual(AuthenticationSchemes.Anonymous, listener.AuthenticationSchemes); Assert.IsTrue(listener.IgnoreWriteExceptions); }