Beispiel #1
0
        public static void CreateObject(SqlConnection connection, string sqlScript, string objectName)
        {
            // Create the object
            ExecuteScript(connection, sqlScript);

            // Verify that the object was created
            DatabaseAssert.ObjectExists(connection, objectName);
        }
Beispiel #2
0
        public static void DropDatabase(SqlConnection connection, string databaseName)
        {
            // Drop the database
            ExecuteScript(connection, String.Format(DataResources.DropDatabase, DataTestHelper.DatabaseName));

            //Verify that database was dropped
            DatabaseAssert.DatabaseDoesNotExist(connection, databaseName);
        }
Beispiel #3
0
        public static void CreateDatabase(SqlConnection connection, string databaseName)
        {
            // Create the database
            ExecuteScript(connection, String.Format(DataResources.CreateDatabase, databaseName));

            //Verify that database was created
            DatabaseAssert.DatabaseExists(connection, databaseName);
        }
Beispiel #4
0
        public static void EmptyTable(SqlConnection connection, string tableName)
        {
            string clearContentItems = String.Format(RemoveTokens(DataResources.EmptyTable), tableName);

            ExecuteScript(connection, clearContentItems);

            // Verify that the table is empty
            DatabaseAssert.TableIsEmpty(connection, tableName);
        }