コード例 #1
0
        /// <summary>
        /// Delete all applications and cleanup.
        /// </summary>
        public static void CleanUp()
        {
            if (isInitialized)
            {
                lock (lockObj)
                {
                    if (isInitialized)
                    {
                        SdkEventListener.Dispose();

                        EtwSession.Stop();

                        Aspx451TestWebApplication.Remove();
                        Aspx451TestWebApplicationWin32.Remove();

                        if (RegistryCheck.IsNet46Installed)
                        {
                            // .NET 4.6 onwards, there is no need of installing agent
                        }
                        else
                        {
                            string installerPath = ExecutionEnvironment.InstallerPath;
                            Installer.InstallProduct(installerPath, "REMOVE=ALL");
                            Iis.Reset();
                        }

                        isInitialized = false;
                    }
                }
            }
        }
コード例 #2
0
 public static void MyClassCleanup()
 {
     AzureStorageHelper.Cleanup();
     DeploymentAndValidationTools.CleanUp();
     Aspx451TestWebApplication.Remove();
     Aspx451TestWebApplicationWin32.Remove();
     Trace.TraceInformation("IIS Restart begin.");
     Iis.Reset();
     Trace.TraceInformation("IIS Restart end.");
     Trace.TraceInformation("HttpTests class cleaned up");
 }