Initialize() static private method

static private Initialize ( MigrationOptions options, ProviderInfo providerInfo ) : void
options MigrationOptions
providerInfo MigSharp.Providers.ProviderInfo
return void
Exemplo n.º 1
0
        public virtual void Setup()
        {
            _options = new MigrationOptions();
            _options.SupportedProviders.Set(new[] { ProviderName }); // avoid validation errors/warnings from other providers

            // initialize IntegrationTestContext
            IProviderMetadata providerMetadata;
            IProvider         provider = _options.SupportedProviders.GetProvider(ProviderName, out providerMetadata);

            IntegrationTestContext.Initialize(_options, provider.GetSupportsAttributes());
        }
Exemplo n.º 2
0
        public virtual void Setup()
        {
            _options = new MigrationOptions();
            _options.SupportedPlatforms.Set(new[] { DbPlatform }); // avoid validation errors/warnings from other providers

            // initialize IntegrationTestContext
            IProviderFactory providerFactory = new ProviderFactory();
            var          providerLocator     = new ProviderLocator(providerFactory);
            ProviderInfo providerInfo        = providerLocator.GetExactly(DbPlatform);

            IntegrationTestContext.Initialize(_options, providerInfo);
        }