Microsoft.Protocols.TestSuites.MS_OUTSPS.MS_OUTSPSAdapter.VerifyCommonSchemaOfListDefinition C# (CSharp) Method

VerifyCommonSchemaOfListDefinition() private method

A method used to verify the requirements for common schema definition of list.
private VerifyCommonSchemaOfListDefinition ( GetListResponseGetListResult responseOfGetList ) : void
responseOfGetList Microsoft.Protocols.TestSuites.Common.GetListResponseGetListResult A parameter represents the response of GetList operation which contain common fields' definitions.
return void
        private void VerifyCommonSchemaOfListDefinition(GetListResponseGetListResult responseOfGetList)
        {
           if (null == responseOfGetList)
           {
               throw new ArgumentNullException("responseOfGetList");
           }

           // Verify Attachments field's id and type.
           string actuallistTemplateValue = responseOfGetList.List.ServerTemplate;
           string docLibraryListTemplateStringValue = ((int)TemplateType.Document_Library).ToString();
           if (!docLibraryListTemplateStringValue.Equals(actuallistTemplateValue, StringComparison.OrdinalIgnoreCase))
           {
               bool isVerifyR584 = this.VerifyTypeAndIdForFieldDefinition(
                                     responseOfGetList,
                                     "Attachments",
                                     "{67df98f4-9dec-48ff-a553-29bece9c5bf4}",
                                     "Attachments");

               // Verify MS-OUTSPS requirement: MS-OUTSPS_R584
               this.Site.CaptureRequirementIfIsTrue(
                                               isVerifyR584,
                                               584,
                                               @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]Attachments[ Field.ID:]{67df98f4-9dec-48ff-a553-29bece9c5bf4}[Field.Type:]Attachments.");
           }
     
           // Verify ContentTypeId field's id and type.
           bool isVerifyR586 = this.VerifyTypeAndIdForFieldDefinition(
                                           responseOfGetList,
                                           "ContentTypeId",
                                           "{03e45e84-1992-4d42-9116-26f756012634}",
                                           "ContentTypeId");

           // Verify MS-OUTSPS requirement: MS-OUTSPS_R586
           this.Site.CaptureRequirementIfIsTrue(
                                           isVerifyR586,
                                           586,
                                           @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]ContentTypeId[ Field.ID:]{03e45e84-1992-4d42-9116-26f756012634}[Field.Type:]ContentTypeId.");

           // Verify Created field's id and type.
           bool isVerifyR587 = this.VerifyTypeAndIdForFieldDefinition(
                                           responseOfGetList,
                                           "Created",
                                           "{8c06beca-0777-48f7-91c7-6da68bc07b69}",
                                           "DateTime");

           // Verify MS-OUTSPS requirement: MS-OUTSPS_R587
           this.Site.CaptureRequirementIfIsTrue(
                                           isVerifyR587,
                                           587,
                                           @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]Created[ Field.ID:]{8c06beca-0777-48f7-91c7-6da68bc07b69}[Field.Type:]DateTime.");

           // Verify ID field's id and type.
           bool isVerifyR588 = this.VerifyTypeAndIdForFieldDefinition(
                                           responseOfGetList,
                                           "ID",
                                           "{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}",
                                           "Counter");

           // Verify MS-OUTSPS requirement: MS-OUTSPS_R588
           this.Site.CaptureRequirementIfIsTrue(
                                           isVerifyR588,
                                           588,
                                           @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]ID[ Field.ID:]{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}[Field.Type:]Counter.");

           // Verify Modified field's id and type.
           bool isVerifyR589 = this.VerifyTypeAndIdForFieldDefinition(
                                           responseOfGetList,
                                           "Modified",
                                           "{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}",
                                           "DateTime");

           // Verify MS-OUTSPS requirement: MS-OUTSPS_R589
           this.Site.CaptureRequirementIfIsTrue(
                                           isVerifyR589,
                                           589,
                                           @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]Modified[ Field.ID:]{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}[Field.Type:]DateTime.");

           // Verify owshiddenversion field's id and type.
           bool isVerifyR590 = this.VerifyTypeAndIdForFieldDefinition(
                                           responseOfGetList,
                                           "owshiddenversion",
                                           "{d4e44a66-ee3a-4d02-88c9-4ec5ff3f4cd5}",
                                           "Integer");

           // Verify MS-OUTSPS requirement: MS-OUTSPS_R590
           this.Site.CaptureRequirementIfIsTrue(
                                           isVerifyR590,
                                           590,
                                           @"[In Common Schema][One of the common properties appears as the attributes of the element GetListResponse.GetListResult.List.Fields.Field. Field.Name:]owshiddenversion[ Field.ID:]{d4e44a66-ee3a-4d02-88c9-4ec5ff3f4cd5}[Field.Type:]Integer.");
        }