public void MSFSSHTTP_FSSHTTPB_TestCase_S20_TC01_Properties_ErrorCode()
        {
            // Initialize the service
            this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain);
            string fileName = this.DefaultFileUrl.Substring(this.DefaultFileUrl.LastIndexOf("/", System.StringComparison.OrdinalIgnoreCase) + 1);

            PropertyIdType property = new PropertyIdType();

            property.id = fileName;
            PropertyIdType[] propertyId = new PropertyIdType[] { property };

            PropertiesSubRequestType propertiess = SharedTestSuiteHelper.CreatePropertiesSubRequest(SequenceNumberGenerator.GetCurrentToken(), PropertiesRequestTypes.PropertyGet, propertyId, this.Site);
            CellStorageResponse      response    = this.Adapter.CellStorageRequest(null, new SubRequestType[] { propertiess });

            if (Common.IsRequirementEnabled(2302011, this.Site))
            {
                PropertiesSubResponseType propertiesResponse = SharedTestSuiteHelper.ExtractSubResponse <PropertiesSubResponseType>(response, 0, 0, this.Site);
                SubResponseType           subresponse        = response.ResponseCollection.Response[0].SubResponse[0];

                if (SharedContext.Current.IsMsFsshttpRequirementsCaptured)
                {
                    // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2302011
                    Site.CaptureRequirementIfAreNotEqual <string>(
                        GenericErrorCodeTypes.Success.ToString(),
                        subresponse.ErrorCode,
                        "MS-FSSHTTP",
                        2302011,
                        @"[PropertiesSubResponseType]In the case of failure, the ErrorCode attribute that is part of a SubResponse element specifies the error code result for this subrequest. ");
                }
                else
                {
                    Site.Assert.AreNotEqual <string>(
                        GenericErrorCodeTypes.Success.ToString(),
                        subresponse.ErrorCode,
                        "In the case of failure, the ErrorCode attribute that is part of a SubResponse element specifies the error code result for this subrequest.");
                }
            }
        }
        public void TestCase_S20_TC01_Properties_Success()
        {
            // Initialize the service
            this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain);

            string[]       ids        = new string[] { "RealtimeTypingEndpointUrl", "DocumentAccessToken", "DocumentAccessTokenTtl" };
            PropertyIdType propertyId = new PropertyIdType();

            PropertyIdType[] propertyIds = new PropertyIdType[3];

            for (int i = 0; i < ids.Length; i++)
            {
                propertyId.id  = ids[i];
                propertyIds[i] = propertyId;
            }

            PropertiesSubRequestType properties = SharedTestSuiteHelper.CreatePropertiesSubRequest(SequenceNumberGenerator.GetCurrentToken(), PropertiesRequestTypes.PropertyGet, propertyIds, this.Site);

            CellStorageResponse       cellStorageResponse = this.Adapter.CellStorageRequest(this.DefaultFileUrl, new SubRequestType[] { properties });
            PropertiesSubResponseType propertiesResponse  = SharedTestSuiteHelper.ExtractSubResponse <PropertiesSubResponseType>(cellStorageResponse, 0, 0, this.Site);
            SubResponseType           subresponse         = cellStorageResponse.ResponseCollection.Response[0].SubResponse[0];

            if (SharedContext.Current.IsMsFsshttpRequirementsCaptured)
            {
                // Capture the requirement MS-FSSHTTP_R246801
                Site.CaptureRequirement(
                    "MS-FSSHTTP",
                    246801,
                    @"[In Appendix B: Product Behavior] Implementation does support Properties operation. (SharePoint Server 2016 and above follow this behavior.)");

                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2301011
                Site.CaptureRequirementIfAreEqual <string>(
                    GenericErrorCodeTypes.Success.ToString(),
                    subresponse.ErrorCode,
                    "MS-FSSHTTP",
                    2301011,
                    @"[PropertiesSubResponseType]In the case of success, it contains information requested as part of a Properties subrequest. ");

                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2443
                Site.CaptureRequirementIfAreEqual <ErrorCodeType>(
                    ErrorCodeType.Success,
                    SharedTestSuiteHelper.ConvertToErrorCodeType(subresponse.ErrorCode, this.Site),
                    "MS-FSSHTTP",
                    2443,
                    @"[Properties Subrequest][The protocol server returns results based on the following conditions:]An ErrorCode value of ""Success"" indicates success in processing the Properties request.");

                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2447
                Site.CaptureRequirement(
                    "MS-FSSHTTP",
                    2447,
                    @"[Property Get]If the Properties attribute is set to ""PropertyGet"", the protocol server considers the Properties subrequest to be of type ""Property Get "". ");

                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2299
                Site.CaptureRequirementIfIsNotNull(
                    propertiesResponse.SubResponseData.PropertyValues,
                    "MS-FSSHTTP",
                    2299,
                    @"[PropertiesSubResponseDataType][PropertyValues]This element MUST only be included in the response if the Properties attribute value is set to ""PropertyGet"".");
            }
            else
            {
                Site.Assert.AreEqual <string>(
                    GenericErrorCodeTypes.Success.ToString(),
                    subresponse.ErrorCode,
                    "[PropertiesSubResponseType]In the case of success, it contains information requested as part of a Properties subrequest. ");
            }
        }