Exemple #1
0
        public DBaseSalesServiceTest()
        {
            this.dataSet = new PersistentCoreBusinessDataSet();

            this.connection        = new SqlConnection(DatabaseConfiguration.CoreBusinessConnectionString);
            this.articlesSqlHelper = new ArticlesSqlHelper(this.connection);

            this.article = new Article
            {
                IdCategory  = 1,
                Title       = "Title",
                Description = "Description",
                ImagesPath  = Guid.NewGuid(),
                Price       = 100m
            };

            container.Options.DefaultScopedLifestyle = new ThreadScopedLifestyle();
            container.Register <ICoreBusinessContext, CoreBusinessTestContext>(Lifestyle.Scoped);
            container.Register <IArticlesRepository, ArticlesRepository>(Lifestyle.Scoped);
            container.Register <ICategoriesRepository, CategoriesRepository>(Lifestyle.Scoped);
            container.Register <SalesService>(Lifestyle.Scoped);
            container.Verify();
        }
 public DBaseGenericRepositoryTest()
 {
     this.dataSet = new PersistentCoreBusinessDataSet();
 }