Microsoft.Protocols.TestSuites.MS_SITESS.S02_ManageSubSite.TestCaseCleanup C# (CSharp) Méthode

TestCaseCleanup() private méthode

private TestCaseCleanup ( ) : void
Résultat void
        public void TestCaseCleanup()
        {
            // Remove the created subsite for the following products since the CreateWeb and DeleteWeb operations are not supported for SharePointServer2007 and WindowsSharePointServices3.
            if (Common.GetConfigurationPropertyValue(Constants.SutVersion, this.Site).Equals(Constants.SharePointServer2010, System.StringComparison.CurrentCultureIgnoreCase)
                || Common.GetConfigurationPropertyValue(Constants.SutVersion, this.Site).Equals(Constants.SharePointFoundation2010, System.StringComparison.CurrentCultureIgnoreCase)
                || Common.GetConfigurationPropertyValue(Constants.SutVersion, this.Site).Equals(Constants.SharePointServer2013, System.StringComparison.CurrentCultureIgnoreCase)
                || Common.GetConfigurationPropertyValue(Constants.SutVersion, this.Site).Equals(Constants.SharePointFoundation2013, System.StringComparison.CurrentCultureIgnoreCase))
            {
                try
                {
                    this.sitessAdapter.DeleteWeb(Common.GetConfigurationPropertyValue(Constants.SiteName, this.Site) + "/" + this.newSubsite);
                }
                catch (SoapException e)
                {
                    Site.Log.Add(LogEntryKind.Comment, "S2_ManageSubSite_TestCleanup: ");
                    Site.Log.Add(LogEntryKind.Comment, e.Code.ToString());
                    Site.Log.Add(LogEntryKind.Comment, e.Message);
                }
            }

            this.sitessAdapter.Reset();
            this.sutAdapter.Reset();
        }