Esempio n. 1
0
        public void MSWEBSS_S03_TC01_GetCustomizedPageStatus_ValidFileUrl()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(1030, this.Site), "The test case is executed only when the property 'R1030Enabled' is true.");

            // For capture requirements in adapter.
            CustomizedPageStatus uncustomizedPageStatus = Adapter.GetCustomizedPageStatus(Common.GetConfigurationPropertyValue("GetCustomizedPageStatus_ValidFileUrl", this.Site));

            // If the product is Windows® SharePoint® Services 3.0 and above, Verify MS-WEBSS requirement: MS-WEBSS_R1030 when invokes the operation "GetCustomizedPageStatus" successfully.
            Site.CaptureRequirement(
                1030,
                @"[In Appendix B: Product Behavior] Implementation does support this[GetCustomizedPageStatus] operation.(<15> Windows SharePoint Services 3.0 and above follow this behavior.)");

            // Verify MS-WEBSS requirement: MS-WEBSS_R929
            Site.CaptureRequirementIfAreEqual <CustomizedPageStatus>(
                CustomizedPageStatus.Uncustomized,
                uncustomizedPageStatus,
                929,
                @"[In CustomizedPageStatus] [Value] Uncustomized [Meaning] The page specified by fileUrl is not customized on this site.");

            string foldName = Common.GetConfigurationPropertyValue("FoldName", this.Site);
            string docName  = Common.GetConfigurationPropertyValue("DocName", this.Site);

            string page = string.Format("{0}/{1}/{2}", Common.GetConfigurationPropertyValue("SubSiteUrl", this.Site), foldName, docName);
            CustomizedPageStatus status = Adapter.GetCustomizedPageStatus(page);

            // Verify MS-WEBSS requirement: MS-WEBSS_R932
            Site.CaptureRequirementIfAreEqual <CustomizedPageStatus>(
                CustomizedPageStatus.None,
                status,
                932,
                @"[In CustomizedPageStatus] [Value] None[Meaning] The specified fileUrl represents a piece of static content, such as an individual text file or a static HTML file.");
        }
Esempio n. 2
0
        /// <summary>
        /// This operation is used to get the customization status (also known as the ghosted status) of the specified page or file.
        /// </summary>
        /// <param name="fileUrl">fileUrl is the URL of a page or file on the protocol server.</param>
        /// <returns>The result of GetCustomizedPageStatus.</returns>
        public CustomizedPageStatus GetCustomizedPageStatus(string fileUrl)
        {
            CustomizedPageStatus customizedPageStatus = CustomizedPageStatus.None;

            customizedPageStatus = this.service.GetCustomizedPageStatus(fileUrl);
            this.ValidateGetCustomizedPageStatus(customizedPageStatus);
            this.CaptureTransportRelatedRequirements();

            return(customizedPageStatus);
        }
        /// <summary>
        /// Capture GetCustomizedPageStatus operation related requirements.
        /// </summary>
        /// <param name="customizedPageStatus">The return result of GetCustomizedPageStatus operation.</param>
        private void ValidateGetCustomizedPageStatus(CustomizedPageStatus customizedPageStatus)
        {
            // Verify MS-WEBSS requirement: MS-WEBSS_R257.
            // The GetCustomizedPageStatus operation is called successfully with right response returned,
            // so MS-WEBSS_R257 can be captured.
            Site.CaptureRequirementIfAreEqual<ValidationResult>(
                ValidationResult.Success,
                SchemaValidation.ValidationResult,
                257,
                @"[In GetCustomizedPageStatus]  This[GetCustomizedPageStatus] operation is defined as follows:
<wsdl:operation name=""GetCustomizedPageStatus"">
    <wsdl:input message=""tns:GetCustomizedPageStatusSoapIn"" />
    <wsdl:output message=""tns:GetCustomizedPageStatusSoapOut"" />
</wsdl:operation>");

            // Verify MS-WEBSS requirement: MS-WEBSS_R259
            Site.CaptureRequirementIfIsNotNull(
                customizedPageStatus,
                259,
                @"[In GetCustomizedPageStatus] The protocol server responds by sending a GetCustomizedPageStatusSoapOut response message.");

            // Verify MS-WEBSS requirement: MS-WEBSS_R260
            bool isContainInCustomizedPageStatus = (customizedPageStatus == CustomizedPageStatus.Customized)
                || (customizedPageStatus == CustomizedPageStatus.None)
                || (customizedPageStatus == CustomizedPageStatus.Uncustomized);
            Site.Assert.IsTrue(isContainInCustomizedPageStatus, "The value of the CustomizedPageStatus is {0}", customizedPageStatus);
            Site.CaptureRequirementIfIsTrue(
                isContainInCustomizedPageStatus,
                260,
                @"[In GetCustomizedPageStatus] The response specifies customization status of the page or file identified by the fileUrl, where the customization status MUST be one of the following: None, Customized, Uncustomized");

            // Verify MS-WEBSS requirement: MS-WEBSS_R276
            Site.CaptureRequirementIfAreEqual<ValidationResult>(
                ValidationResult.Success,
                SchemaValidation.ValidationResult,
                276,
                @"[In GetCustomizedPageStatusSoapOut] The SOAP body contains a GetCustomizedPageStatusResponse element.");

            // Verify MS-WEBSS requirement: MS-WEBSS_R715
            Site.CaptureRequirementIfAreEqual<ValidationResult>(
                ValidationResult.Success,
                SchemaValidation.ValidationResult,
                715,
                @"[In GetCustomizedPageStatusResponse] The definition of the GetCustomizedPageStatusResponse element is as follows:
<s:element name=""GetCustomizedPageStatusResponse"">
  <s:complexType>
    <s:sequence>
      <s:element name=""GetCustomizedPageStatusResult"" type=""tns:CustomizedPageStatus""/>
    </s:sequence>
  </s:complexType>
</s:element>");

            // Verify MS-WEBSS requirement: MS-WEBSS_R279
            Site.CaptureRequirementIfAreEqual<ValidationResult>(
                ValidationResult.Success,
                SchemaValidation.ValidationResult,
                279,
                @"[In GetCustomizedPageStatusResponse] GetCustomizedPageStatusResult: A single element of type only as defined in CustomizedPageStatus (section 3.1.4.9.4.1).");

            // Verify MS-WEBSS requirement: MS-WEBSS_R923
            Site.CaptureRequirementIfAreEqual<ValidationResult>(
                ValidationResult.Success,
                SchemaValidation.ValidationResult,
                923,
                @"[In CustomizedPageStatus] The CustomizedPageStatus type is an enumeration of three possible values defined as follows:
<s:simpleType name=""CustomizedPageStatus"">
  <s:restriction base=""s:string"">
    <s:enumeration value=""None""/>
    <s:enumeration value=""Uncustomized""/>
    <s:enumeration value=""Customized""/>
  </s:restriction>
</s:simpleType>");
        }