public void WebBootHttpRuntimeCache() { //// Arrange var container = new ServiceContainer(); var loader = new WebBoot(container); //// Act loader.Boot(); //// Assert Assert.That(Active.CacheManager, Is.Not.Null); Assert.That(Active.CacheManager.RuntimeCache, Is.Not.Null); Assert.That(Active.CacheManager.RuntimeCache.GetType(), Is.EqualTo(typeof(HttpRuntimeCacheProvider))); }
/// <summary> /// Handles the Application Start. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The <see cref="EventArgs"/>. /// </param> private void Application_Start(object sender, EventArgs e) { // Code that runs on application startup AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); // Instantiate the Service Container var container = new ServiceContainer(); container.EnableAnnotatedConstructorInjection(); container.EnableAnnotatedPropertyInjection(); // Bootstrap! var loader = new WebBoot(container); loader.Boot(); }