public static void BeforeTestRun()
        {
            var task = Task.Run(() => CreateEmptyDatabase());

            IisExpressHelper.StartIis();
            Host = new Host();

            // Sets up all our domain services
            DomainBootstrapper.SetUp();

            task.Wait();
        }
        /// <summary>Integrates Unity when the application starts.</summary>
        public static void Start()
        {
            LogManager.SetFactory(new NLogLoggerFactory());

            // Set up domain functions
            DomainBootstrapper.SetUp();

            FilterProviders.Providers.Remove(FilterProviders.Providers.OfType <FilterAttributeFilterProvider>().First());

            var container = UnityConfig.GetConfiguredContainer();

            FilterProviders.Providers.Add(new UnityFilterAttributeFilterProvider(container));
            DependencyResolver.SetResolver(new UnityDependencyResolver(container));

            // TODO: Uncomment if you want to use PerRequestLifetimeManager
            // Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule));

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new FeatureViewLocationRazorViewEngine());
        }
Beispiel #3
0
 public void SetUp()
 {
     // set up handlers
     DomainBootstrapper.SetUp();
 }