public DBaseErrorsReportingServiceTest() { this.container = new UnityContainer(); this.container.RegisterType <IErrorsReportingContext, ErrorsReportingContext>(new HierarchicalLifetimeManager()); this.container.RegisterType(typeof(IGenericRepository <>), typeof(GenericRepository <>)); this.container.RegisterType <IErrorsReportingService, ErrorsReportingService>(); this.dataSet = new PersistentErrorsReportingDataSet(); this.connection = new SqlConnection(DatabaseConfiguration.ErrorsReportingConnectionString); this.exceptionsSqlHelper = new ExceptionsSqlHelper(this.connection); }
public DBaseErrorsReportingServiceTest() { this.dataSet = new PersistentErrorsReportingDataSet(); this.connection = new SqlConnection(DatabaseConfiguration.ErrorsReportingConnectionString); this.exceptionsSqlHelper = new ExceptionsSqlHelper(this.connection); container.Options.DefaultScopedLifestyle = new ThreadScopedLifestyle(); container.Register <IDbContext, ErrorsReportingContext>(Lifestyle.Scoped); container.Register <IGenericRepository <ErrorReportApplication>, GenericRepository <ErrorReportApplication> >(Lifestyle.Scoped); container.Register <IGenericRepository <ErrorReportException>, GenericRepository <ErrorReportException> >(Lifestyle.Scoped); container.Register <ErrorsReportingService>(Lifestyle.Scoped); container.Verify(); }
public DBaseGenericRepositoryTest() { this.dataSet = new PersistentErrorsReportingDataSet(); }