예제 #1
0
        private static IWebHookStore CreateStore()
        {
            // Delete any existing DB
            string connectionString = ConfigurationManager.ConnectionStrings[WebHookStoreContext.ConnectionStringName].ConnectionString;
            Database.Delete(connectionString);

            // Initialize DB using code first migration
            var dbConfig = new EF.Configuration();
            var migrator = new DbMigrator(dbConfig);
            migrator.Update();

            HttpConfiguration config = new HttpConfiguration();
            config.InitializeCustomWebHooksSqlStorage();
            IWebHookStore store = CustomServices.GetStore();
            Assert.IsType<SqlWebHookStore>(store);
            return store;
        }
예제 #2
0
        private static IWebHookStore CreateStore()
        {
            // Delete any existing DB
            string connectionString = ConfigurationManager.ConnectionStrings[WebHookStoreContext.ConnectionStringName].ConnectionString;

            Database.Delete(connectionString);

            // Initialize DB using code first migration
            var dbConfig = new EF.Configuration();
            var migrator = new DbMigrator(dbConfig);

            migrator.Update();

            HttpConfiguration config = new HttpConfiguration();

            config.InitializeCustomWebHooksSqlStorage(encryptData: false);
            IWebHookStore store = CustomServices.GetStore();

            Assert.IsType <SqlWebHookStore>(store);
            return(store);
        }