/// <summary> /// Initializes a <see cref="DbFixture"/> with a connection string. /// </summary> /// <param name="connectionString"> /// Connection string for accessing the test database. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="connectionString"/> is a null reference /// (Nothing in Visual Basic) /// </exception> public DbFixture(string connectionString, string databaseName, IDbFactory factory) { if (connectionString==null) throw new ArgumentNullException("connectionString"); if (databaseName==null) throw new ArgumentNullException("databaseName"); if (factory==null) throw new ArgumentNullException("factory"); this.connectionString=connectionString; this.databaseName=databaseName; this.factory=factory; this.admin= this.factory.CreateAdmin(this.connectionString,this.databaseName); }
/// <summary> /// Initializes a <see cref="DbFixture"/> with a connection string. /// </summary> /// <param name="connectionString">Connection string for accessing the test database.</param> /// <param name="databaseName">The name of the database to use.</param> /// <param name="factory">The factory to use.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="connectionString"/> is a null reference /// (Nothing in Visual Basic) /// </exception> public DbFixture(string connectionString, string databaseName, IDbFactory factory) { if (connectionString == null) { throw new ArgumentNullException("connectionString"); } if (databaseName == null) { throw new ArgumentNullException("databaseName"); } if (factory == null) { throw new ArgumentNullException("factory"); } this.connectionString = connectionString; this.databaseName = databaseName; this.factory = factory; this.admin = this.factory.CreateAdmin(this.connectionString, this.databaseName); }
public DbGenerator(DbAdministratorBase admin, DataSet dataSource) { this.admin = admin; this.dataSource = dataSource; this.graph = DataGraph.Create(this.DataSource); }