public void GetProviderType_BaseConnectionString()
        {
            var connectionString = string.Format(BaseConnectionString, string.Empty);

            ((Action)(() => MsAccessDataHelper.GetProviderType(connectionString)))
            .Should().Throw <InvalidOperationException>();
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        protected override string GetTempTableName()
        {
            ProviderType provider = MsAccessDataHelper.GetProviderType(_connection);

            _tempDatabasePath = Path.GetTempFileName();
            MsAccessDataHelper.CreateEmptyDatabase(_tempDatabasePath, provider);
            _tempDatabase = new OleDbConnection(MsAccessDataHelper.CreateConnectionString(_tempDatabasePath, provider));
            _tempDatabase.Open();

            return(DestinationTableName);
        }
 public void GetProviderType_JetConnectionString()
 {
     MsAccessDataHelper.GetProviderType(string.Format(BaseConnectionString, JetProvider))
     .Should().Be(ProviderType.Jet);
 }
 public void GetProviderType_EmptyConnectionString()
 {
     ((Action)(() => MsAccessDataHelper.GetProviderType(string.Empty))).Should().Throw <ArgumentException>();
 }
        public void GetProviderType_NullConnectionString()
        {
            string connectionString = null;

            ((Action)(() => MsAccessDataHelper.GetProviderType(connectionString))).Should().Throw <ArgumentNullException>();
        }