Microsoft.Protocols.TestSuites.SharedAdapter.MsfsshttpAdapterCapture.ValidateSchemaLockSubResponseDataType C# (CSharp) Method

ValidateSchemaLockSubResponseDataType() public static method

Capture requirements related with SchemaLockSubResponseDataType.
public static ValidateSchemaLockSubResponseDataType ( SchemaLockSubResponseDataType schemaLockSubResponseData, ITestSite site ) : void
schemaLockSubResponseData Microsoft.Protocols.TestSuites.Common.SchemaLockSubResponseDataType The SchemaLockSubResponseDataType
site ITestSite Instance of ITestSite
return void
        public static void ValidateSchemaLockSubResponseDataType(SchemaLockSubResponseDataType schemaLockSubResponseData, ITestSite site)
        {
            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1136
            // if can launch this method, the schema matches
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(SchemaLockSubResponseDataType),
                     schemaLockSubResponseData.GetType(),
                     "MS-FSSHTTP",
                     1136,
                     @"[In SchemaLock Subrequest] The SubResponseData element returned for a schema lock subrequest is of type SchemaLockSubResponseDataType.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1394
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     1394,
                     @"[In SubResponseDataGenericType][SubResponseDataGenericType MUST take one of the forms described in the following table] SchemaLockSubResponseDataType: Type definition for schema lock subresponse data.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1132
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     1132,
                     @"[In SchemaLock Subrequest] The SchemaLockSubResponseDataType defines the type of the SubResponseData element inside the schema lock SubResponse element.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R726
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     726,
                     @"[In SchemaLockSubResponseType] SubResponseData: A SchemaLockSubResponseDataType that specifies schema lock-related information provided by the protocol server that was requested as part of the schema lock subrequest.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R709
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     709,
                     @"[In SchemaLockSubResponseDataType][SchemaLockSubResponseDataType schema is:]
                     <xs:complexType name=""SchemaLockSubResponseDataType"">
                         <xs:attribute name=""LockType"" type=""tns:LockTypes"" use=""optional"" />
                         <xs:attribute name=""ExclusiveLockReturnReason"" type=""tns:ExclusiveLockReturnReasonTypes"" use=""optional"" />
                     </xs:complexType>");

            if (schemaLockSubResponseData.LockTypeSpecified)
            {
                ValidateLockTypes(site);

                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1135
                // if can launch this method, the schema matches.
                site.CaptureRequirement(
                         "MS-FSSHTTP",
                         1135,
                         @"[In SchemaLock Subrequest] The lock type is sent as the LockType attribute in the schema lock SubResponseData element.");
            }

            if (schemaLockSubResponseData.ExclusiveLockReturnReasonSpecified)
            {
                ValidateExclusiveLockReturnReasonTypes(site);
            }
        }
    }