Beispiel #1
0
        /// <summary>
        /// Loads the database with existing data.
        /// </summary>
        /// <param name="connectionString">The connection string.</param>
        /// <param name="schemaFilePathName">Name of the schema file path.</param>
        /// <param name="datasetFilePathName">Name of the dataset file path.</param>
        /// <param name="clientType">Type of the client.</param>
        /// <remarks>Loads all data from the datasetFilePathName .XML file into all tables contained in the schemaFilePathName .XSD file.</remarks>
        protected virtual void LoadDatabase(string connectionString, string schemaFilePathName, string datasetFilePathName, DatabaseClientType clientType)
        {
            ValidateConnectionString(connectionString);
            ValidateSupportFileExists(schemaFilePathName);
            ValidateSupportFileExists(datasetFilePathName);

            _database = GetDatabase(connectionString, clientType);

            _database.ReadXmlSchema(schemaFilePathName);
            _database.ReadXml(datasetFilePathName);

            _database.PerformDbOperation(NDbUnit.Core.DbOperationFlag.CleanInsertIdentity);
        }
Beispiel #2
0
 /// <summary>
 /// Resets the database.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="clientType">Type of the database.</param>
 protected virtual void ResetDatabase(string connectionString, DatabaseClientType clientType)
 {
     _database = GetDatabase(connectionString, clientType);
     _database.PerformDbOperation(NDbUnit.Core.DbOperationFlag.Refresh);
 }
 /// <summary>
 /// Resets the database.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="clientType">Type of the database.</param>
 protected virtual void ResetDatabase(string connectionString, DatabaseClientType clientType)
 {
     _database = GetDatabase(connectionString, clientType);
     _database.PerformDbOperation(NDbUnit.Core.DbOperationFlag.Refresh);
 }
Beispiel #4
0
 public void DatabaseSetUp()
 {
     _mySqlDatabase.PerformDbOperation(NDbUnit.Core.DbOperationFlag.CleanInsertIdentity);
 }
        /// <summary>
        /// Loads the database with existing data.
        /// </summary>
        /// <param name="connectionString">The connection string.</param>
        /// <param name="schemaFilePathName">Name of the schema file path.</param>
        /// <param name="datasetFilePathName">Name of the dataset file path.</param>
        /// <param name="clientType">Type of the client.</param>
        /// <remarks>Loads all data from the datasetFilePathName .XML file into all tables contained in the schemaFilePathName .XSD file.</remarks>
        protected virtual void LoadDatabase(string connectionString, string schemaFilePathName, string datasetFilePathName, DatabaseClientType clientType)
        {
            ValidateConnectionString(connectionString);
            ValidateSupportFileExists(schemaFilePathName);
            ValidateSupportFileExists(datasetFilePathName);

            _database = GetDatabase(connectionString, clientType);

            _database.ReadXmlSchema(schemaFilePathName);
            _database.ReadXml(datasetFilePathName);

            _database.PerformDbOperation(NDbUnit.Core.DbOperationFlag.CleanInsertIdentity);
        }