/// <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."); }
/// <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."); }