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(); }
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); }