示例#1
0
        public void TestFixtureSetUp()
        {
            //  Initialize Autofac for dependency injection.
            AutofacRegistrations.RegisterDaoFactory();
            Scope      = AutofacRegistrations.Container.BeginLifetimeScope();
            DaoFactory = Scope.Resolve <IDaoFactory>();

            //  Initialize AutoMapper with Streamus' server mappings.
            Streamus.InitializeApplication();
        }
示例#2
0
        public void TestFixtureSetUp()
        {
            using (var httpSimulator = new HttpSimulator().SimulateRequest())
            {
                //  Initialize AutoMapper and AutoFac.
                Streamus.InitializeApplication();

                Logger         = DependencyResolver.Current.GetService <ILog>();
                DaoFactory     = DependencyResolver.Current.GetService <IDaoFactory>();
                Session        = DependencyResolver.Current.GetService <ISession>();
                ManagerFactory = DependencyResolver.Current.GetService <IManagerFactory>();
            }

            Helpers = new Helpers(ManagerFactory);
        }