public void DatabaseFixtureSetUp()
        {
            var testdataDatabaseXsd01 = GetDataSchemaFile();
            var testdataTestdataXml01 = GetDataFile();

            var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["IntegrationTests.Properties.Settings.TDDWithMVCConnectionString"].ConnectionString;
            _mySqlDatabase = new SqlDbUnitTest(connectionString);

            _mySqlDatabase.ReadXmlSchema(testdataDatabaseXsd01);
            _mySqlDatabase.ReadXml(testdataTestdataXml01);
        }
Beispiel #2
0
        public void DatabaseFixtureSetUp()
        {
            var testdataDatabaseXsd01 = GetDataSchemaFile();
            var testdataTestdataXml01 = GetDataFile();

            var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["IntegrationTests.Properties.Settings.TDDWithMVCConnectionString"].ConnectionString;

            _mySqlDatabase = new SqlDbUnitTest(connectionString);

            _mySqlDatabase.ReadXmlSchema(testdataDatabaseXsd01);
            _mySqlDatabase.ReadXml(testdataTestdataXml01);
        }
Beispiel #3
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);
        }
        /// <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);
        }