Microsoft.Protocols.TestSuites.MS_LISTSWS.S02_OperationOnContentType.MSLISTSWS_S02_TC32_GetListContentTypesAndProperties_Fault C# (CSharp) Method

MSLISTSWS_S02_TC32_GetListContentTypesAndProperties_Fault() private method

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

            #region Invoke GetListContentTypesAndProperties operation with listName invalid.
            string invalidListName = TestSuiteHelper.GetUniqueListName();

            bool isErrorCodeVerified = false;
            try
            {
                this.listswsAdapter.GetListContentTypesAndProperties(invalidListName, string.Empty, string.Empty, false, false);
            }
            catch (SoapException e)
            {
                string soapErrorCode = e.Detail.LastChild.InnerText;
                if (soapErrorCode == "0x82000006")
                {
                    isErrorCodeVerified = true;
                }
            }
            #endregion

            #region Capture R1042 R1043
            Site.CaptureRequirementIfIsTrue(
                isErrorCodeVerified,
                1042,
                @"[In GetListContentTypesAndProperties]If listName does not correspond to a list from either of these checks, the protocol server MUST return a SOAP fault with error code 0x82000006.");
            Site.CaptureRequirementIfIsTrue(
                isErrorCodeVerified,
                1043,
                @"[In [In GetListContentTypesAndProperties][If listName does not correspond to a list from either of these checks, the protocol server MUST return a SOAP fault with error code 0x82000006.] This indicates that the list does not exist or might have been deleted by another user.");
            #endregion
        }
S02_OperationOnContentType