Microsoft.Protocols.TestSuites.MS_LISTSWS.S03_OperationOnListItem.MSLISTSWS_S03_TC59_GetVersionCollection_InvalidGUIDAndNotCorrespond_SP3WSS3 C# (CSharp) Method

MSLISTSWS_S03_TC59_GetVersionCollection_InvalidGUIDAndNotCorrespond_SP3WSS3() private method

        public void MSLISTSWS_S03_TC59_GetVersionCollection_InvalidGUIDAndNotCorrespond_SP3WSS3()
        {
            Site.Assume.IsTrue(Common.IsRequirementEnabled(2492, this.Site), @"Test is executed only when R2492Enabled is set to true.");

            // Initialize an invalid ListName structure.
            string invalidListName = TestSuiteHelper.GetInvalidGuidAndNocorrespondString();

            // Initialize a valid ListName structure.
            string listname = TestSuiteHelper.CreateList();

            List<string> listString = TestSuiteHelper.AddListItems(listname, 1);

            // Read value from configuration file.
            string validFieldName = Common.GetConfigurationPropertyValue("ListFieldText", this.Site);
            bool isSoapFaultGenerated = false;
            string errorString = string.Empty;
            try
            {
                // Call GetVersionCollection method to get the version.
                this.listswsAdapter.GetVersionCollection(invalidListName, listString[0], validFieldName);
            }
            catch (SoapException soapException)
            {
                // Verify MS-LISTSWS requirement: MS-LISTSWS_R2492
                isSoapFaultGenerated = true;
                errorString = TestSuiteHelper.GetErrorString(soapException);
            }

            // If the value of the error is null and the detailed message of SoapException is equal to the 
            // specific value, then R2492 should be covered.
            Site.Log.Add(
                LogEntryKind.Debug,
                "The actual value: isSoapFaultGenerated[{0}],errorString[{1}] for requirement #R2492",
                isSoapFaultGenerated,
                string.IsNullOrEmpty(errorString) ? "NullOrEmpty" : errorString);

            Site.CaptureRequirementIfIsTrue(
                isSoapFaultGenerated
                && "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).".Equals(errorString, StringComparison.OrdinalIgnoreCase),
                2492,
                @"[In Appendix B: Product Behavior] Implementation does not return a SOAP fault with error code 0x82000006. (<68> Section 3.1.4.25: Windows SharePoint Services 3.0 return the following SOAP fault with no error code: ""GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx)"".)");
        }
S03_OperationOnListItem