示例#1
0
        /// <summary>
        /// Returns the DataBAse XML as a data set use dataset.writexml to write to a file
        /// </summary>
        /// <returns></returns>
        public DataSet GetDataSetFromDb()
        {
            var sqldb = new SqlUnitTest(_connectionString);

            sqldb.ReadXmlSchema(_xmlSchema);
            return(sqldb.GetDataSetFromDb());
        }
示例#2
0
        /// <summary>
        /// Does the database operation on the database server.
        /// </summary>
        /// <param name="dataFile">The Xml file that is to be used on the database.</param>
        /// <param name="schemaFile">The Xsd file that is to be used on the database.</param>
        /// <param name="dbOperationFlag">The database operation to perform on the database server</param>
        private void PerformDbOperation(string dataFile, string schemaFile, DbOperationFlag dbOperationFlag)
        {
            var sqlUnitTest = new SqlUnitTest(_connectionString);

            sqlUnitTest.ReadXmlSchema(schemaFile);
            sqlUnitTest.ReadXml(dataFile);
            sqlUnitTest.PerformDbOperation(dbOperationFlag);
        }
示例#3
0
        /// <summary>
        /// Returns a string collection of table names from the selected xmlfile.
        /// </summary>
        /// <param name="expectedDataFile">The Xml file to be used for the table names.</param>
        /// <param name="sqlDatabase">The sqlDatabase to be used.</param>
        /// <returns>A string collection of tables.</returns>
        public StringCollection GetTablesInXml(string expectedDataFile, SqlUnitTest sqlDatabase)
        {
            sqlDatabase.ReadXmlSchema(_xmlSchema);
            sqlDatabase.ReadXml(expectedDataFile);
            StringCollection tablesInXml = sqlDatabase.TablesInDataSet;

            return(tablesInXml);
        }