Microsoft.Protocols.TestSuites.MS_WEBSS.S10_OperationsOnActivatedFeatures.MSWEBSS_S10_TC04_GetActivatedFeaturesResponseWithCommaDelimitedGUID C# (CSharp) Method

MSWEBSS_S10_TC04_GetActivatedFeaturesResponseWithCommaDelimitedGUID() private method

        public void MSWEBSS_S10_TC04_GetActivatedFeaturesResponseWithCommaDelimitedGUID()
        {
            Adapter.InitializeService(UserAuthentication.Authenticated);

            string activatedFeatures = Adapter.GetActivatedFeatures();

            // Get the GUIDs of the features on the site.
            string webSiteName = Common.GetConfigurationPropertyValue("webSiteName", this.Site);

            string strFeature = SutAdapter.GetObjectId(webSiteName, FeaturesPosition.SiteFeatures);
            Site.Assert.IsNotNull(strFeature, "This value of the feature id should be non-empty");

            // Get the GUIDs of the features on the parent site collection.
            strFeature = SutAdapter.GetObjectId(webSiteName, FeaturesPosition.SiteCollectionFeatures);
            Site.Assert.IsNotNull(strFeature, "This value of the feature id should be non-empty");

            char[] commaSeparators = new char[] { (char)CONST_CHARS.Comma };
            string[] activatedFeaturesList = activatedFeatures.Split(commaSeparators, StringSplitOptions.RemoveEmptyEntries);

            foreach (string s in activatedFeaturesList)
            {
                Guid id;
                Site.Assert.IsTrue(Guid.TryParse(s, out id), "The substring should be a GUID.");
            }

            // Verify MS-WEBSS requirement: MS-WEBSS_R132
            bool isVerifiedR132 = false;
            if (activatedFeatures.Contains(","))
            {
                isVerifiedR132 = true;
            }

            Site.CaptureRequirementIfIsTrue(
                isVerifiedR132,
                132,
                @"[In GetActivatedFeaturesSoapOut] It[GetActivatedFeaturesSoapOut] consists of a string consisting of a comma-delimited list of GUIDs, where each GUID identifies a feature activated in the site (2) or the site collection.");
        }