Пример #1
0
        public IntegrationTestDbFixture()
        {
            ClassFactory = Bootstrapper.Init("TenderSearch*.dll");

            dbMigration = ClassFactory.GetMigrator(Environments.PRODUCTION);

            if (dbMigration == null)
            {
                throw new NoNullAllowedException("dbMigration not found..");
            }

            dbMigration.Execute(DB_DIRECTORY);
        }
Пример #2
0
        public IntegrationTestDbFixture()
        {
            ClassFactory = Bootstrapper.Init("TechChallenge*.dll");

            ConnectionStrings.SetOneTime();
            ApplicationSettings.SetOneTime();

            var dbMigration = ClassFactory.GetMigrator(DbNames.TechChallenge);

            if (dbMigration == null)
            {
                throw new NoNullAllowedException("dbMigration not found..");
            }

            // Exclude SqlServerMigrations files before running this.  Seeders and SqlSeeders are mutually exclusive.
            dbMigration.Execute();
        }
        public IntegrationTestDbFixture()
        {
            Console.WriteLine("Bootstrapper.Init()..");
            ClassFactory = Bootstrapper.Init();

            dbMigration = ClassFactory.GetMigrator(Environments.INTEGRATIONTEST);
            if (dbMigration == null)
            {
                throw new NoNullAllowedException("dbMigration not found..");
            }

            Console.WriteLine("DestroyDb if any..");
            dbMigration.DestroyDb();

            Console.WriteLine("CreateDb..");
            dbMigration.CreateDb(DB_DIRECTORY);
        }