当前位置: 首页>>代码示例>>C#>>正文


C# ITestSite.CaptureRequirementIfAreEqual方法代码示例

本文整理汇总了C#中ITestSite.CaptureRequirementIfAreEqual方法的典型用法代码示例。如果您正苦于以下问题:C# ITestSite.CaptureRequirementIfAreEqual方法的具体用法?C# ITestSite.CaptureRequirementIfAreEqual怎么用?C# ITestSite.CaptureRequirementIfAreEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITestSite的用法示例。


在下文中一共展示了ITestSite.CaptureRequirementIfAreEqual方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ValidateEditorsTableSubResponse

        /// <summary>
        /// Capture requirements related to EditorsTable sub response.
        /// </summary>
        /// <param name="editorsTableSubResponse">Containing the EditorsTableSubResponse information.</param>
        /// <param name="site">An object provides logging, assertions, and SUT adapters for test code onto its execution context.</param>
        public static void ValidateEditorsTableSubResponse(EditorsTableSubResponseType editorsTableSubResponse, ITestSite site)
        {
            ValidateSubResponseType(editorsTableSubResponse as SubResponseType, site);

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R4693
            // if can launch this method, the schema matches.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(EditorsTableSubResponseType),
                     editorsTableSubResponse.GetType(),
                     "MS-FSSHTTP",
                     4693,
                     @"[In SubResponseElementGenericType] Depending on the Type attribute specified in the SubRequest element, the SubResponseElementGenericType MUST take one of the forms: EditorsTableSubResponseType.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R5747
            // if can launch this method, the schema matches.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(EditorsTableSubResponseType),
                     editorsTableSubResponse.GetType(),
                     "MS-FSSHTTP",
                     5747,
                     @"[In SubResponseType] The SubResponseElementGenericType takes one of the following forms: EditorsTableSubResponseType.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1769
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     1769,
                     @"[In EditorsTableSubResponseType][The schema of EditorsTableSubResponseType is] <xs:complexType name=""EditorsTableSubResponseType"">
                       <xs:complexContent>
                         <xs:extension base=""tns:SubResponseType"">
                            <xs:sequence minOccurs=""0"" maxOccurs=""1"">
                               <xs:element name=""SubResponseData"">
                                 <xs:complexType>
                                   <xs:complexContent>
                                     <xs:restriction base=""xs:anyType""/>
                                   </xs:complexContent>
                                 </xs:complexType>
                               </xs:element>
                             </xs:sequence>
                         </xs:extension>
                       </xs:complexContent>
                     </xs:complexType>");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R3079
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     3079,
                     @"[In EditorsTableSubResponseType] SubResponseData: It MUST be an empty element without any attributes.");
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:55,代码来源:MsfsshttpEditorsTableCapture.cs

示例2: ValidateResponseToken

        /// <summary>
        /// Capture requirements related with RequestToken within Response element
        /// </summary>
        /// <param name="response">The Response information</param>
        /// <param name="expectedToken">The expected RequestToken</param>
        /// <param name="site">Instance of ITestSite</param>
        public static void ValidateResponseToken(Response response, string expectedToken, ITestSite site)
        {
            if (expectedToken == null)
            {
                // When the expected token is null, then indicating there is no expected token value returned by server.
                return;
            }

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R65
            site.CaptureRequirementIfAreEqual<string>(
                     expectedToken,
                     response.RequestToken,
                     "MS-FSSHTTP",
                     65,
                     @"[In Request] The one-to-one mapping between the Response element and the Request element MUST be maintained by using RequestToken.");

            // Directly capture requirement MS-FSSHTTPB_R70, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     70,
                     @"[In Request] Depending on the other types of errors[GenericErrorCodeTypes, CellRequestErrorCodeTypes, DependencyCheckRelatedErrorCodeTypes, LockAndCoauthRelatedErrorCodeTypes and NewEditorsTableCategoryErrorCodeTypes], the error code for that type MUST be returned by the protocol server.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R929
            site.CaptureRequirementIfAreEqual<string>(
                     expectedToken,
                     response.RequestToken,
                     "MS-FSSHTTP",
                     929,
                     @"[In Common Message Processing Rules and Events][The protocol server MUST follow the following common processing rules for all types of subrequests] The protocol server sends a Response element for each Request element.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R95
            site.CaptureRequirementIfAreEqual<string>(
                     expectedToken,
                     response.RequestToken,
                     "MS-FSSHTTP",
                     95,
                     @"[In Response] For each Request element that is part of a cell storage service request, there MUST be a corresponding Response element in a cell storage service response.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R105
            site.CaptureRequirementIfAreEqual<string>(
                     expectedToken,
                     response.RequestToken,
                     "MS-FSSHTTP",
                     105,
                     @"[In Response] RequestToken: A nonnegative integer that specifies the request token that uniquely identifies the Request element whose response is being generated.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R108
            site.CaptureRequirementIfAreEqual<string>(
                     expectedToken,
                     response.RequestToken,
                     "MS-FSSHTTP",
                     108,
                     @"[In Response] The one-to-one mapping between the Response element and the Request element MUST be maintained by using the request token.");
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:60,代码来源:MsfsshttpCommonCapture.cs

示例3: CaptureTypesElementRequirements

        /// <summary>
        /// Capture requirements for Type structure
        /// </summary>
        /// <param name="types">Type structure</param>
        /// <param name="site">A instance of ITestSite.</param>
        public static void CaptureTypesElementRequirements(string types, ITestSite site)
        {
            #region MS-PCCRD_R51
            // Add debug info
            site.Log.Add(LogEntryKind.Debug, "Types: {0}", types);

            site.CaptureRequirementIfAreEqual<string>(
                "PeerDist:PeerDistData",
                types,
                51,
                "[In Types] This element [Types] MUST be set to: PeerDist:PeerDistData.");

            #endregion
        }
开发者ID:Microsoft,项目名称:WindowsProtocolTestSuites,代码行数:19,代码来源:PccrdBothRoleCaptureCode.cs

示例4: VerifyKnowledge

        /// <summary>
        /// This method is used to verify knowledge related requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyKnowledge(Knowledge instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the Knowledge related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type Knowledge is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Capture requirement MS-FSSHTTPB_R359, if stream object start type is StreamObjectHeaderStart16bit. 
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPB",
                     359,
                     @"[In Knowledge] Knowledge Start (2 bytes): A 16-bit stream object header (section 2.2.1.5.1) that specifies a knowledge (section 2.2.1.13) start.");

            // Directly capture requirement MS-FSSHTTPB_R360, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     360,
                     @"[In Knowledge] Specialized Knowledge (variable): Zero or more specialized knowledge structures (section 2.2.1.13.1).");

            // Verify the stream object header end related requirements.
            this.ExpectStreamObjectHeaderEnd(instance.StreamObjectHeaderEnd, instance.GetType(), site);
            this.ExpectCompoundObject(instance.StreamObjectHeaderStart, site);

            // Directly capture requirement MS-FSSHTTPB_R361, if stream object end type is StreamObjectHeaderStart16bit. 
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderEnd8bit),
                     instance.StreamObjectHeaderEnd.GetType(),
                     "MS-FSSHTTPB",
                     361,
                     @"[In Knowledge] Knowledge End (1 byte): An 8-bit stream object header (section 2.2.1.5.3) that specifies a knowledge end.");
        }
开发者ID:OfficeDev,项目名称:Interop-TestSuites,代码行数:42,代码来源:MsfsshttpbKnowledgeCapture.cs

示例5: VerifyObjectGroupObjectDataForDataNodeObject

        /// <summary>
        /// Verify ObjectGroupObjectData for the DataNodeObject related requirements.
        /// </summary>
        /// <param name="objectGroupObjectData">Specify the objectGroupObjectData instance.</param>
        /// <param name="dataNodeDeclare">Specify the data node object declare instance.</param>
        /// <param name="objectGroupList">Specify all the ObjectGroupDataElementData list.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public static void VerifyObjectGroupObjectDataForDataNodeObject(ObjectGroupObjectData objectGroupObjectData, ObjectGroupObjectDeclare dataNodeDeclare, List<ObjectGroupDataElementData> objectGroupList, ITestSite site)
        {
            #region Verify the Object Group Object Data

            // Object Extended GUID Array : Specifies an ordered list of the Object Extended GUIDs for each child of the Root Node.
            ExGUIDArray childObjectExGuidArray = objectGroupObjectData.ObjectExGUIDArray;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The count of Cell ID Array is:{0}", childObjectExGuidArray.Count.DecodedValue);

            // If the Object Extended GUID Array is an empty list, indicates that the count of the array is 0.
            // So capture these requirements.
            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R3
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     childObjectExGuidArray.Count.DecodedValue,
                     "MS-FSSHTTPD",
                     3,
                     @"[In Common Node Object Properties][Data of Object Extended GUID Array field] Specifies an empty list of Object Extended GUIDs.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R71
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     childObjectExGuidArray.Count.DecodedValue,
                     "MS-FSSHTTPD",
                     71,
                     @"[In Data Node Object References] The Object Extended GUID Array, as specified in [MS-FSSHTTPB] section 2.2.1.12.6.4, of the Data Node Object MUST specify an empty array.");

            // Cell ID Array : Specifies an empty list of Cell IDs.
            CellIDArray cellIDArray = objectGroupObjectData.CellIDArray;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The count of Cell ID Array is:{0}", cellIDArray.Count);

            // If the Object Extended GUID Array is an empty list, indicates that the count of the array is 0.
            // So capture these requirements.
            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R6
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     cellIDArray.Count,
                     "MS-FSSHTTPD",
                     6,
                     @"[In Common Node Object Properties][Data of Cell ID Array field] Specifies an empty list of Cell IDs.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R72
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     cellIDArray.Count,
                     "MS-FSSHTTPD",
                     72,
                     @"[In Data Node Object Cell References] The Object Extended GUID Array, as specified in [MS-FSSHTTPB] section 2.2.1.12.6.4, of the Data Node Object MUST specify an empty array.");

            #endregion 

            #region Verify the Object Group Object Declaration

            // Object Extended GUID : An extended GUID which specifies an identifier for this object. This GUID MUST be unique within this file.
            ExGuid currentObjectExGuid = dataNodeDeclare.ObjectExtendedGUID;

            // Check whether Object Extended GUID is unique.
            bool isUnique = IsGuidUnique(currentObjectExGuid, objectGroupList);

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "Whether the Object Extended GUID is unique:{0}", isUnique);

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8103
            site.CaptureRequirementIfIsTrue(
                     isUnique,
                     "MS-FSSHTTPD",
                     8103,
                     @"[In Common Node Object Properties][Data of Object Extended GUID field] This GUID[Object Extended GUID] MUST be different within this file in once response.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8103
            site.CaptureRequirementIfIsTrue(
                     isUnique,
                     "MS-FSSHTTPD",
                     8103,
                     @"[In Common Node Object Properties][Data of Object Extended GUID field] This GUID[Object Extended GUID] MUST be different within this file in once response.");

            // Object Partition ID : A compact unsigned 64-bit integer which MUST be 1.
            Compact64bitInt objectPartitionID = dataNodeDeclare.ObjectPartitionID;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The value of Object Partition ID is:{0}", objectPartitionID.DecodedValue);

            site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectPartitionID.GetType()), "The type of objectPartitionID should be a compact unsigned 64-bit integer.");
            site.Assert.IsTrue(objectPartitionID.DecodedValue == 1, "The actual value of objectPartitionID should be 1.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R19            
            site.CaptureRequirement(
                     "MS-FSSHTTPD",
                     19,
                     @"[In Common Node Object Properties][Data of Object Partition ID field] A compact unsigned 64-bit integer that MUST be ""1"".");
//.........这里部分代码省略.........
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:101,代码来源:MsfsshttpdCapture.cs

示例6: VerifyObjectGroupObjectDataForIntermediateNode

        /// <summary>
        /// Verify ObjectGroupObjectData for the Intermediate node object group related requirements.
        /// </summary>
        /// <param name="objectGroupObjectData">Specify the objectGroupObjectData instance.</param>
        /// <param name="intermediateDeclare">Specify the intermediate declare instance.</param>
        /// <param name="objectGroupList">Specify all the ObjectGroupDataElementData list.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public static void VerifyObjectGroupObjectDataForIntermediateNode(ObjectGroupObjectData objectGroupObjectData, ObjectGroupObjectDeclare intermediateDeclare, List<ObjectGroupDataElementData> objectGroupList, ITestSite site)
        {
            #region Verify the Object Group Object Data

            ExGUIDArray childObjectExGuidArray = objectGroupObjectData.ObjectExGUIDArray;

            if (childObjectExGuidArray != null && childObjectExGuidArray.Count.DecodedValue != 0)
            {
                // If the intermediate node can be build then verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R65
                site.CaptureRequirement(
                         "MS-FSSHTTPD",
                         65,
                         @"[In Intermediate Node Object References] The Object Extended GUID Array, as specified in [MS-FSSHTTPB] section 2.2.1.12.6.4, of the Intermediate Node Object MUST specify an ordered set of Object Extended GUIDs.");

                // If the intermediate node can be build then verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8007 and MS-FSSHTTPD_R8008
                site.CaptureRequirement(
                         "MS-FSSHTTPD",
                         8007,
                         @"[In Common Node Object Properties][Intermediate of Object Extended GUID Array field] Specifies an ordered list of the Object Extended GUIDs for each child of this Node.");

                // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8008
                site.CaptureRequirement(
                         "MS-FSSHTTPD",
                         8008,
                         @"[In Common Node Object Properties][Intermediate of Object Extended GUID Array field] Object Extended GUID Array entries MUST be ordered based on the sequential file bytes represented by each Node Object.");
            }

            // Cell ID Array : Specifies an empty list of Cell IDs.
            CellIDArray cellIDArray = objectGroupObjectData.CellIDArray;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The count of Cell ID Array is:{0}", cellIDArray.Count);

            // If the Cell ID Array is an empty list, indicates that the count of the array is 0.
            // So capture these requirements.
            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R5
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     cellIDArray.Count,
                     "MS-FSSHTTPD",
                     5,
                     @"[In Common Node Object Properties][Intermediate of Cell ID Array field] Specifies an empty list of Cell IDs.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R67
            site.CaptureRequirementIfAreEqual<ulong>(
                     0,
                     cellIDArray.Count,
                     "MS-FSSHTTPD",
                     67,
                     @"[In Intermediate Node Object Cell References] The Cell Reference Array of the Object MUST specify an empty array.");

            #endregion 

            #region Verify the Object Group Object Declaration

            // Object Extended GUID : An extended GUID which specifies an identifier for this object. This GUID MUST be unique within this file.
            ExGuid currentObjectExGuid = intermediateDeclare.ObjectExtendedGUID;

            // Check whether Object Extended GUID is unique.
            bool isVerify8102 = IsGuidUnique(currentObjectExGuid, objectGroupList);

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "Whether the Object Extended GUID is unique:{0}", isVerify8102);

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8102
            site.CaptureRequirementIfIsTrue(
                     isVerify8102,
                     "MS-FSSHTTPD",
                     8102,
                     @"[In Common Node Object Properties][Intermediate of Object Extended GUID Field] This GUID[Object Extended GUID] MUST  be different within this file in once response.");

            // Object Partition ID : A compact unsigned 64-bit integer which MUST be 1.
            Compact64bitInt objectPartitionID = intermediateDeclare.ObjectPartitionID;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The value of Object Partition ID is:{0}", objectPartitionID.DecodedValue);

            site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectPartitionID.GetType()), "The type of objectPartitionID should be a compact unsigned 64-bit integer.");
            site.Assert.IsTrue(objectPartitionID.DecodedValue == 1, "The actual value of objectPartitionID should be 1.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R18            
            site.CaptureRequirement(
                     "MS-FSSHTTPD",
                     18,
                     @"[In Common Node Object Properties][Intermediate of Object Partition ID field] A compact unsigned 64-bit integer that MUST be ""1"".");

            // Object Data Size :A compact unsigned 64-bit integer which MUST be the size of the Object Data field.
            Compact64bitInt objectDataSize = intermediateDeclare.ObjectDataSize;

            // Add the log information.
            site.Log.Add(LogEntryKind.Debug, "The value of Object Data Size is:{0}", objectDataSize.DecodedValue);

            site.Assert.IsTrue(typeof(Compact64bitInt).Equals(objectDataSize.GetType()), "The type of objectPartitionID should be a compact unsigned 64-bit integer.");
//.........这里部分代码省略.........
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:101,代码来源:MsfsshttpdCapture.cs

示例7: VerifyPutChangesResponse

        /// <summary>
        /// This method is used to test AppliedStorageIndex related adapter requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyPutChangesResponse(PutChangesResponse instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the Win32 Error related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type Win32Error is null due to parsing error or type casting error.");
            }

            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Capture requirement MS-FSSHTTPB_R99059, if the header is StreamObjectHeaderStart32bit.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart32bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPB",
                     99059,
                     @"[In Put Changes] Put Changes Response (4 bytes): A 32-bit stream object header (section 2.2.1.5.2) that specifies a Put Changes response.");

            // Directly capture requirement MS-FSSHTTPB_R99060, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     99060,
                     @"[In Put Changes] Applied Storage Index Id (variable): An extended GUID (section 2.2.1.7) that specifies the applied storage index ID.");

            // Directly capture requirement MS-FSSHTTPB_R99061, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     99061,
                     @"[In Put Changes] Data Elements Added (variable): An extended GUID array (section 2.2.1.8) that specifies the data element identifiers of the added data elements.");
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:35,代码来源:MsfsshttpbResponseCapture.cs

示例8: VerifyQueryChangesSubResponseData

        /// <summary>
        /// This method is used to test Query Changes related adapter requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyQueryChangesSubResponseData(QueryChangesSubResponseData instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the Query Changes related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type QueryChangesSubResponseData is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.QueryChangesResponseStart, instance.GetType(), site);

            // Directly capture requirement MS-FSSHTTPB_R595, if the stream object header is StreamObjectHeaderStart32bit.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart32bit),
                     instance.QueryChangesResponseStart.GetType(),
                     "MS-FSSHTTPB",
                     595,
                     @"[In Query Changes] Query Changes Response (4 bytes): A 32-bit stream object header (section 2.2.1.5.2) that specifies a Query Changes response.");

            // Directly capture requirement MS-FSSHTTPB_R596, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     596,
                     @"[In Query Changes] Storage Index Extended GUID (variable): An extended GUID (section 2.2.1.7) that specifies storage index.");

            // Directly capture requirement MS-FSSHTTPB_R598, if the reserved value equals to 1. 
            site.CaptureRequirementIfAreEqual<int>(
                     0,
                     instance.ReservedQueryChanges,
                     "MS-FSSHTTPB",
                     598,
                     @"[In Query Changes] Reserved (7 bits): A 7-bit reserved field that MUST be set to zero.");

            // Directly capture requirement MS-FSSHTTPB_R601, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     601,
                     @"[In Query Changes] Knowledge (variable): A knowledge (section 2.2.1.13) that specifies the current state of the file on the server.");

            // Verify the compound related requirements.
            this.ExpectSingleObject(instance.QueryChangesResponseStart, site);
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:47,代码来源:MsfsshttpbResponseCapture.cs

示例9: VerifyErrorStringSupplementalInfo

        /// <summary>
        /// This method is used to test Response Error related adapter requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyErrorStringSupplementalInfo(ErrorStringSupplementalInfo instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the ErrorStringSupplementalInfo related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type ErrorStringSupplementalInfo is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Directly capture requirement MS-FSSHTTPB_R99063, if the header type is StreamObjectHeaderStart32bit.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart32bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPB",
                     99063,
                     @"[In Response Error] Error String Supplemental Info Start (4 bytes, optional): Zero or one 32-bit stream object header (section 2.2.1.5.2) that specifies an error string supplemental info start. ");

            // Directly capture requirement MS-FSSHTTPB_R99064, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     99064,
                     @"[In Response Error] Error String Supplemental Info (variable): A string item (section 2.2.1.4) that specifies the supplemental information of the error string for the error string supplemental info start.");

            this.ExpectSingleObject(instance.StreamObjectHeaderStart, site);
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:32,代码来源:MsfsshttpbResponseCapture.cs

示例10: VerifyIntermediateNodeObject

        /// <summary>
        /// This method is used to verify the intermediate node related requirements.
        /// </summary>
        /// <param name="instance">Specify the intermediate node instance.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyIntermediateNodeObject(IntermediateNodeObject instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the IntermediateNodeObject related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type IntermediateNodeObject is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R55
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPD",
                     55,
                     @"[In Intermediate Node Object Data] Intermediate Node Start (2 bytes): A 16-bit stream object header, as specified in [MS-FSSHTTPB] section 2.2.1.5.1, with a Header Type of 0x00, Compound of 0x1, Type of 0x1F, and Length of 0x00.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R56
            site.CaptureRequirementIfAreEqual<ushort>(
                     0xFC,
                     LittleEndianBitConverter.ToUInt16(instance.StreamObjectHeaderStart.SerializeToByteList().ToArray(), 0),
                     "MS-FSSHTTPD",
                     56,
                     @"[In Intermediate Node Object Data] Intermediate Node Start (2 bytes): The value of this field[Intermediate Node Start] MUST be 0x00FC.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R57
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.Signature.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPD",
                     57,
                     @"[In Intermediate Node Object Data] Signature Header (2 bytes): A 16-bit stream object header, as specified in [MS-FSSHTTPB] section 2.2.1.5.1, with a Header Type of  0x00, Compound of 0x0, Type of 0x21, and Length equal to the size of Signature Data.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R61
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.DataSize.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPD",
                     61,
                     @"[In Intermediate Node Object Data] Data Size Header (2 bytes): A 16-bit stream object header, as specified in [MS-FSSHTTPB] section 2.2.1.5.1, with a Header Type of  0x00, Compound of 0x0, Type of 0x22, and Length of 0x08 (the size, in bytes, of Data Size).");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8013
            site.CaptureRequirementIfAreEqual<uint>(
                     0x1110,
                     LittleEndianBitConverter.ToUInt16(instance.DataSize.StreamObjectHeaderStart.SerializeToByteList().ToArray(), 0),
                     "MS-FSSHTTPD",
                     8013,
                     @"[In Intermediate Node Object Data] Data Size Header (2 bytes): The value of this field[Data Size Header] MUST be 0x1110.");

            // Verify the stream object header end related requirements.
            this.ExpectStreamObjectHeaderEnd(instance.StreamObjectHeaderEnd, instance.GetType(), site);
            this.ExpectCompoundObject(instance.StreamObjectHeaderStart, site);

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R63
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderEnd8bit),
                     instance.StreamObjectHeaderEnd.GetType(),
                     "MS-FSSHTTPD",
                     63,
                     @"[In Intermediate Node Object Data] Intermediate Node End (1 byte): An 8-bit stream object header end, as specified in [MS-FSSHTTPB] section 2.2.1.5.3, that specifies a stream object of type 0x1F.");

            // Verify MS-FSSHTTPD requirement: MS-FSSHTTPD_R8014
            site.CaptureRequirementIfAreEqual<byte>(
                     0x7D,
                     instance.StreamObjectHeaderEnd.SerializeToByteList()[0],
                     "MS-FSSHTTPD",
                     8014,
                     @"[In Intermediate Node Object Data] Intermediate Node End (1 byte):The value of this field[Intermediate Node End] MUST be 0x7D.");
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:76,代码来源:MsfsshttpbNodeObjectCapture.cs

示例11: ValidateWhoAmISubResponse

        /// <summary>
        /// Capture requirements related with WhoAmI Sub-request.
        /// </summary>
        /// <param name="whoamiSubResponse">Containing the WhoAmISubResponse information</param>
        /// <param name="site">Instance of ITestSite</param>
        public static void ValidateWhoAmISubResponse(WhoAmISubResponseType whoamiSubResponse, ITestSite site)
        {
            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R765
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     765,
                     @"[In WhoAmISubResponseType][WhoAmISubResponseType schema is:]
                     <xs:complexType name=""WhoAmISubResponseType"">
                       <xs:complexContent>
                         <xs:extension base=""tns:SubResponseType"">
                           <xs:sequence minOccurs=""0"" maxOccurs=""1"">
                              <xs:element name=""SubResponseData"" type=""tns:WhoAmISubResponseDataType""/>
                           </xs:sequence>
                         </xs:extension>
                       </xs:complexContent>
                     </xs:complexType>");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1316
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(WhoAmISubResponseType),
                     whoamiSubResponse.GetType(),
                     "MS-FSSHTTP",
                     1316,
                     @"[In WhoAmI Subrequest][The protocol client sends a WhoAmI SubRequest message, which is of type WhoAmISubRequestType] The protocol server responds with a WhoAmI SubResponse message, which is of type WhoAmISubResponseType as specified in section 2.3.1.22.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R4692
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(WhoAmISubResponseType),
                     whoamiSubResponse.GetType(),
                     "MS-FSSHTTP",
                     4692,
                     @"[In SubResponseElementGenericType] Depending on the Type attribute specified in the SubRequest element, the SubResponseElementGenericType MUST take one of the forms: WhoAmISubResponseType.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R5746
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(WhoAmISubResponseType),
                     whoamiSubResponse.GetType(),
                     "MS-FSSHTTP",
                     5746,
                     @"[In SubResponseType] The SubResponseElementGenericType takes one of the following forms: WhoAmISubResponseType.");

            ErrorCodeType errorCode;
            site.Assert.IsTrue(Enum.TryParse<ErrorCodeType>(whoamiSubResponse.ErrorCode, true, out errorCode), "Fail to convert the error code string {0} to the Enum type ErrorCodeType", whoamiSubResponse.ErrorCode);
            if (errorCode == ErrorCodeType.Success)
            {
                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R268
                site.CaptureRequirementIfIsNotNull(
                         whoamiSubResponse.SubResponseData,
                         "MS-FSSHTTP",
                         268,
                         @"[In SubResponseElementGenericType][The SubResponseData element MUST be sent as part of the SubResponse element in a cell storage service response message if the ErrorCode attribute that is part of the SubResponse element is set to a value of ""Success"" and one of the following conditions is true:] The Type attribute that is specified in the SubRequest element is set to a value of ""WhoAmI"".");
            }

            // Verify requirements related with its base type: SubResponseType
            ValidateSubResponseType(whoamiSubResponse as SubResponseType, site);

            // Verify requirements related with SubResponseDataType
            if (whoamiSubResponse.SubResponseData != null)
            {
                ValidateWhoAmISubResponseDataType(whoamiSubResponse.SubResponseData, site);
            }
        }
开发者ID:OfficeDev,项目名称:Interop-TestSuites,代码行数:67,代码来源:MsfsshttpWhoAmICapture.cs

示例12: ValidateSchemaLockSubResponseDataType

        /// <summary>
        /// Capture requirements related with SchemaLockSubResponseDataType.
        /// </summary>
        /// <param name="schemaLockSubResponseData">The SchemaLockSubResponseDataType</param>
        /// <param name="site">Instance of ITestSite</param>
        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);
            }
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:65,代码来源:MsfsshttpSchemaLockCapture.cs

示例13: ValidateGetDocMetaInfoSubResponse

        /// <summary>
        /// Capture requirements related to GetDocMetaInfo sub response.
        /// </summary>
        /// <param name="getDocMetaInfoSubResponse">Containing the GetDocMetaInfoSubResponse information.</param>
        /// <param name="site">An object provides logging, assertions, and SUT adapters for test code onto its execution context.</param>
        public static void ValidateGetDocMetaInfoSubResponse(GetDocMetaInfoSubResponseType getDocMetaInfoSubResponse, ITestSite site)
        {
            ValidateSubResponseType(getDocMetaInfoSubResponse as SubResponseType, site);

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1797
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     1797,
                     @"[In GetDocMetaInfoSubResponseType][The schema of GetDocMetaInfoSubResponseType is] <xs:complexType name=""GetDocMetaInfoSubResponseType"">
                       <xs:complexContent>
                         <xs:extension base=""tns:SubResponseType"">
                           <xs:sequence minOccurs=""0"" maxOccurs=""1"">
                     <xs:element name=""SubResponseData"" type=""tns:GetDocMetaInfoSubResponseDataType""/>
                     </xs:sequence>
                         </xs:extension>
                       </xs:complexContent>
                     </xs:complexType>");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2003
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     2003,
                     @"[In GetDocMetaInfo Subrequest][The protocol client sends a GetDocMetaInfo SubRequest message, which is of type GetDocMetaInfoSubRequestType] The protocol server responds with a GetDocMetaInfo SubResponse message, which is of type GetDocMetaInfoSubResponseType as specified in section 2.3.1.30.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R4694
            // if can launch this method, the schema matches.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(GetDocMetaInfoSubResponseType),
                     getDocMetaInfoSubResponse.GetType(),
                     "MS-FSSHTTP",
                     4694,
                     @"[In SubResponseElementGenericType] Depending on the Type attribute specified in the SubRequest element, the SubResponseElementGenericType MUST take one of the forms: GetDocMetaInfoSubResponseType.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R5748
            // if can launch this method, the schema matches.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(GetDocMetaInfoSubResponseType),
                     getDocMetaInfoSubResponse.GetType(),
                     "MS-FSSHTTP",
                     5748,
                     @"[In SubResponseType] The SubResponseElementGenericType takes one of the following forms: GetDocMetaInfoSubResponseType.");

            if (getDocMetaInfoSubResponse.SubResponseData != null)
            {
                ValidateGetDocMetaInfoSubResponseData(site);
            }

            if (string.Compare("Success", getDocMetaInfoSubResponse.ErrorCode, StringComparison.OrdinalIgnoreCase) == 0)
            {
                // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1693
                bool isVerifyR1693 = getDocMetaInfoSubResponse.SubResponseData != null;

                // If popup the assert, the case run fail. 
                site.Assert.IsTrue(
                            isVerifyR1693,
                            "For requirement MS-FSSHTTPB_R1693, the SubResponseData should not be NULL.");

                // If the above logic is right, MS-FSSHTTP_R1693 can be captured.
                site.CaptureRequirement(
                         "MS-FSSHTTP",
                         1693,
                         @"[In SubResponseElementGenericType][The SubResponseData element MUST be sent as part of the SubResponse element in a cell storage service response message if the ErrorCode attribute that is part of the SubResponse element is set to a value of ""Success"" and one of the following conditions is true:] The Type attribute that is specified in the SubRequest element is set to a value of ""GetDocMetaInfo"".");

                // If the value of element "SubResponseData" in the sub-response is not null, then capture MS-FSSHTTP_R1800.
                site.CaptureRequirementIfIsNotNull(
                         getDocMetaInfoSubResponse.SubResponseData,
                         "MS-FSSHTTP",
                         1800,
                         @"[In GetDocMetaInfoSubResponseType] [In GetDocMetaInfoSubResponseType] As part of processing the GetDocMetaInfo subrequest, the SubResponseData element MUST be sent as part of the SubResponse element in a cell storage service response message if the following condition is true:
                         The ErrorCode attribute that is part of the SubResponse element is set to a value of ""Success"".");
            }

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R2013
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     2013,
                     @"[In GetDocMetaInfo Subrequest] The GetDocMetaInfoPropertySetType elements have one Property element per metadata item of type GetDocMetaInfoPropertyType as defined in section 2.3.1.29.");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1685
            // if can launch this method, the schema matches.
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     1685,
                     @"[In SubResponseDataGenericType][SubResponseDataGenericType MUST take one of the forms described in the following table] GetDocMetaInfoSubResponseDataType: Type definition for Get Doc Meta Info subresponse data.");
        }
开发者ID:OfficeDev,项目名称:Interop-TestSuites,代码行数:93,代码来源:MsfsshttpGetDocMetaInfoCapture.cs

示例14: VerifyContentTagKnowledgeEntry

        /// <summary>
        /// This method is used to test Content Tag Knowledge Entry related adapter requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param>
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyContentTagKnowledgeEntry(ContentTagKnowledgeEntry instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the Content Tag Knowledge Entry related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type ContentTagKnowledgeEntry is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Capture requirement MS-FSSHTTPB_R385, if stream object start type is StreamObjectHeaderStart16bit. 
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPB",
                     385,
                     @"[In Content Tag Knowledge Entry] Content Tag Entry Start (2 bytes): A 16-bit stream object header (section 2.2.1.5.1) that specifies the start of a content tag entry.");

            // Directly capture requirement MS-FSSHTTPB_R386, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     386,
                     @"[In Content Tag Knowledge Entry] BLOB Heap Extended GUID (variable): An extended GUID (section 2.2.1.7) that specifies the BLOB heap this content tag is for.");

            // Directly capture requirement MS-FSSHTTPB_R387, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     387,
                     @"[In Content Tag Knowledge Entry] Clock Data (variable): A binary item (section 2.2.1.3) that specifies changes when the contents of the BLOB heap change on the server.");

            // Verify the stream object header end related requirements.
            this.ExpectSingleObject(instance.StreamObjectHeaderStart, site);
        }
开发者ID:OfficeDev,项目名称:Interop-TestSuites,代码行数:39,代码来源:MsfsshttpbKnowledgeCapture.cs

示例15: ValidateVersionNumberType

        /// <summary>
        /// Capture requirements related with VersionNumberType.
        /// </summary>
        /// <param name="versionNumber">A version number</param>
        /// <param name="site">Instance of ITestSite</param>
        private static void ValidateVersionNumberType(ushort versionNumber, ITestSite site)
        {
            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R423
            site.CaptureRequirement(
                     "MS-FSSHTTP",
                     423,
                     @"[In VersionNumberType][VersionNumberType schema is:]
                     <xs:simpleType name=""VersionNumberType"">
                         <xs:restriction base=""xs:unsignedShort"">
                           <xs:minInclusive value=""2""/>
                     <xs:maxInclusive value=""2""/>
                         </xs:restriction>
                     </xs:simpleType>");

            // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R424
            site.CaptureRequirementIfAreEqual<ushort>(
                     2,
                     versionNumber,
                     "MS-FSSHTTP",
                     424,
                     @"[In VersionNumberType] The value of VersionNumberType MUST be the value that is listed in the following: [2].");

            site.CaptureRequirementIfAreEqual<ushort>(
                     2,
                     versionNumber,
                     "MS-FSSHTTP",
                     425,
                     @"[In VersionNumberType] 2 [means] a version number of 2.");
        }
开发者ID:ClareMSYanGit,项目名称:Interop-TestSuites,代码行数:34,代码来源:MsfsshttpCommonCapture.cs


注:本文中的ITestSite.CaptureRequirementIfAreEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。