CreateTestDatabasesWithCertAuth() public static method

Helper function to create the test databases.
public static CreateTestDatabasesWithCertAuth ( System powershell ) : void
powershell System
return void
        public void SetupTest()
        {
            powershell = System.Management.Automation.PowerShell.Create();

            MockHttpServer.SetupCertificates();

            UnitTestHelper.SetupUnitTestSubscription(powershell);

            serverName = SqlDatabaseTestSettings.Instance.ServerName;
            powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName);

            // Create atleast two test databases
            NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell);
        }
Exemplo n.º 2
0
        public static void InitializeClass(TestContext context)
        {
            powershell = PowerShell.Create();

            MockHttpServer.SetupCertificates();

            UnitTestHelper.SetupUnitTestSubscription(powershell);

            serverName = SqlDatabaseTestSettings.Instance.ServerName;
            powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName);

            // Create atleast two test databases
            NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell);

            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell);
        }