RemoveTestDatabasesWithSqlAuth() public static method

Helper function to remove the test databases.
public static RemoveTestDatabasesWithSqlAuth ( ) : void
return void
Esempio n. 1
0
        public static void InitializeClass(TestContext context)
        {
            // Create atleast two test databases
            NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth();

            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth();
        }
Esempio n. 2
0
        public void CleanupTest()
        {
            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth();

            // Save the mock session results
            MockServerHelper.SaveDefaultSessionCollection();
        }
Esempio n. 3
0
        public static void InitializeClass(TestContext context)
        {
            AzureSessionInitializer.InitializeAzureSession();
            ServiceManagementProfileProvider.InitializeServiceManagementProfile();
            AzureSMProfileProvider.Instance.Profile = new AzureSMProfile();
            // Create atleast two test databases
            NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth();

            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth();
        }
Esempio n. 4
0
        /// <summary>
        /// Helper function to remove the test databases.
        /// </summary>
        public static void RemoveTestDatabasesWithSqlAuth()
        {
            using (System.Management.Automation.PowerShell powershell =
                       System.Management.Automation.PowerShell.Create())
            {
                // Create a context
                NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth(
                    powershell,
                    "$context");

                // Remove the 2 test databases
                NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth(
                    powershell,
                    "$context");
            }
        }