public virtual void FixtureSetup() { //AutoMapperMappings.CreateMappings(); // Umbraco Application var applicationMock = new Mock<UmbracoApplication>(); // Sets Umbraco SqlSytax and ensure database is setup DbPreTestDataWorker = new DbPreTestDataWorker(); DbPreTestDataWorker.ValidateDatabaseSetup(); DbPreTestDataWorker.DeleteAllAnonymousCustomers(); // Merchello CoreBootStrap var bootManager = new WebBootManager(); bootManager.Initialize(); if(MerchelloContext.Current == null) Assert.Ignore("MerchelloContext.Current is null"); CurrentCustomer = DbPreTestDataWorker.MakeExistingAnonymousCustomer(); // Product saves ProductService.Created += ProductServiceCreated; ProductService.Saved += ProductServiceSaved; ProductService.Deleted += ProductServiceDeleted; ProductVariantService.Created += ProductVariantServiceCreated; ProductVariantService.Saved += ProductVariantServiceSaved; ProductVariantService.Deleted += ProductVariantServiceDeleted; // BasketCheckout // ItemCacheService.Saved += BasketItemCacheSaved; SalePreparationBase.Finalizing += SalePreparationBaseOnFinalizing; }
public void Init() { var syntax = (DbSyntax)Enum.Parse(typeof(DbSyntax), ConfigurationManager.AppSettings["syntax"]); var worker = new DbPreTestDataWorker {SqlSyntax = syntax }; _database = worker.Database; var deletions = new DatabaseSchemaCreation(_database); deletions.UninstallDatabaseSchema(); }
public void Init() { var syntax = (DbSyntax)Enum.Parse(typeof(DbSyntax), ConfigurationManager.AppSettings["syntax"]); var worker = new DbPreTestDataWorker {SqlSyntax = syntax }; var logger = Logger.CreateWithDefaultLog4NetConfiguration(); var sqlSyntax = SqlSyntaxProviderTestHelper.SqlSyntaxProvider(syntax); _database = worker.Database; _databaseSchemaHelper = new MerchelloDatabaseSchemaHelper(_database, logger, sqlSyntax); }
public void Init() { var syntax = (DbSyntax)Enum.Parse(typeof(DbSyntax), ConfigurationManager.AppSettings["syntax"]); _worker = new DbPreTestDataWorker {SqlSyntax = syntax }; var schemaHelper = new DatabaseSchemaHelper(_worker.Database, _worker.TestLogger, _worker.SqlSyntaxProvider); var deletions = new DatabaseSchemaCreation(_worker.Database, _worker.TestLogger, schemaHelper, _worker.SqlSyntaxProvider); deletions.UninstallDatabaseSchema(); }
public virtual void FixtureSetup() { // Sets Umbraco SqlSytax and ensure database is setup var dbPreTestDataWorker = new DbPreTestDataWorker(); // Merchello CoreBootStrap var bootManager = new WebBootManager(dbPreTestDataWorker.TestLogger, dbPreTestDataWorker.SqlSyntaxProvider); bootManager.Initialize(); if (MerchelloContext.Current == null) Assert.Ignore("MerchelloContext.Current is null"); }
public virtual void FixtureSetup() { // Sets Umbraco SqlSytax and ensure database is setup var dbPreTestDataWorker = new DbPreTestDataWorker(); // Merchello CoreBootStrap var bootManager = new WebBootManager(dbPreTestDataWorker.TestLogger, dbPreTestDataWorker.SqlSyntaxProvider); bootManager.Initialize(); if (MerchelloContext.Current == null) { Assert.Ignore("MerchelloContext.Current is null"); } }
public virtual void FixtureSetup() { //AutoMapperMappings.CreateMappings(); // Umbraco Application var applicationMock = new Mock <UmbracoApplication>(); var applicationContext = new Mock <ApplicationContext>(); // Sets Umbraco SqlSytax and ensure database is setup DbPreTestDataWorker = new DbPreTestDataWorker(); DbPreTestDataWorker.ValidateDatabaseSetup(); DbPreTestDataWorker.DeleteAllAnonymousCustomers(); // Merchello CoreBootStrap var bootManager = new WebBootManager(DbPreTestDataWorker.TestLogger, DbPreTestDataWorker.SqlSyntaxProvider); bootManager.Initialize(applicationContext.Object); if (MerchelloContext.Current == null) { Assert.Ignore("MerchelloContext.Current is null"); } CurrentCustomer = DbPreTestDataWorker.MakeExistingAnonymousCustomer(); // Product saves ProductService.Created += ProductServiceCreated; ProductService.Saved += ProductServiceSaved; ProductService.Deleted += ProductServiceDeleted; ProductVariantService.Created += ProductVariantServiceCreated; ProductVariantService.Saved += ProductVariantServiceSaved; ProductVariantService.Deleted += ProductVariantServiceDeleted; // BasketCheckout // ItemCacheService.Saved += BasketItemCacheSaved; SalePreparationBase.Finalizing += SalePreparationBaseOnFinalizing; EntityCollectionService.Created += EntityCollectionServiceOnCreated; EntityCollectionService.Deleted += EntityCollectionServiceOnDeleted; }
public void Init() { var worker = new DbPreTestDataWorker(); _database = worker.Database; _creation = new BaseDataCreation(_database); }
public void Init() { var syntax = (DbSyntax)Enum.Parse(typeof(DbSyntax), ConfigurationManager.AppSettings["syntax"]); var worker = new DbPreTestDataWorker {SqlSyntax = syntax }; _database = worker.Database; }