/// <summary> /// This method is used to test Cell Knowledge 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 VerifyCellKnowledge(CellKnowledge instance, ITestSite site) { // If the instance is not null and there are no parsing errors, then the Cell Knowledge related adapter requirements can be directly captured. if (null == instance) { site.Assert.Fail("The instance of type CellKnowledge 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_R372, if stream object start type is StreamObjectHeaderStart16bit. site.CaptureRequirementIfAreEqual <Type>( typeof(StreamObjectHeaderStart16bit), instance.StreamObjectHeaderStart.GetType(), "MS-FSSHTTPB", 372, @"[In Cell Knowledge] Cell Knowledge Start (2 bytes): A 16-bit stream object header (section 2.2.1.5.1) that specifies a cell knowledge start."); if (instance.CellKnowledgeEntryList != null && instance.CellKnowledgeEntryList.Count != 0) { // Directly capture requirement MS-FSSHTTPB_R373, if there are no parsing errors. site.CaptureRequirement( "MS-FSSHTTPB", 373, @"[In Cell Knowledge] Cell Knowledge Data (variable): A cell knowledge entry (section 2.2.1.13.2.2) that specifies one data element knowledge reference."); } else if (instance.CellKnowledgeRangeList != null && instance.CellKnowledgeRangeList.Count != 0) { // Directly capture requirement MS-FSSHTTPB_R3731, if there are no parsing errors. site.CaptureRequirement( "MS-FSSHTTPB", 3731, @"[In Cell Knowledge] Cell Knowledge Data (variable): A cell knowledge range (section 2.2.1.13.2.1) that specifies one or more data element knowledge references."); } else { site.Log.Add(LogEntryKind.Debug, "The CellKnowledgeEntryList and CellKnowledgeRangeList are same null or empty list in the same time."); } // Verify the stream object header end related requirements. this.ExpectStreamObjectHeaderEnd(instance.StreamObjectHeaderEnd, instance.GetType(), site); this.ExpectCompoundObject(instance.StreamObjectHeaderStart, site); // Capture requirement MS-FSSHTTPB_R374, if the stream object end header is StreamObjectHeaderEnd8bit. site.CaptureRequirementIfAreEqual <Type>( typeof(StreamObjectHeaderEnd8bit), instance.StreamObjectHeaderEnd.GetType(), "MS-FSSHTTPB", 374, @"[In Cell Knowledge] Cell Knowledge End (1 byte): An 8-bit stream object header (section 2.2.1.5.3) that specifies the cell knowledge end."); }
/// <summary> /// This method is used to test Cell Knowledge 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 VerifyCellKnowledge(CellKnowledge instance, ITestSite site) { // If the instance is not null and there are no parsing errors, then the Cell Knowledge related adapter requirements can be directly captured. if (null == instance) { site.Assert.Fail("The instance of type CellKnowledge 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_R372, if stream object start type is StreamObjectHeaderStart16bit. site.CaptureRequirementIfAreEqual<Type>( typeof(StreamObjectHeaderStart16bit), instance.StreamObjectHeaderStart.GetType(), "MS-FSSHTTPB", 372, @"[In Cell Knowledge] Cell Knowledge Start (2 bytes): A 16-bit stream object header (section 2.2.1.5.1) that specifies a cell knowledge start."); if (instance.CellKnowledgeEntryList != null && instance.CellKnowledgeEntryList.Count != 0) { // Directly capture requirement MS-FSSHTTPB_R373, if there are no parsing errors. site.CaptureRequirement( "MS-FSSHTTPB", 373, @"[In Cell Knowledge] Cell Knowledge Data (variable): A cell knowledge entry (section 2.2.1.13.2.2) that specifies one data element knowledge reference."); } else if (instance.CellKnowledgeRangeList != null && instance.CellKnowledgeRangeList.Count != 0) { // Directly capture requirement MS-FSSHTTPB_R3731, if there are no parsing errors. site.CaptureRequirement( "MS-FSSHTTPB", 3731, @"[In Cell Knowledge] Cell Knowledge Data (variable): A cell knowledge range (section 2.2.1.13.2.1) that specifies one or more data element knowledge references."); } else { site.Log.Add(LogEntryKind.Debug, "The CellKnowledgeEntryList and CellKnowledgeRangeList are same null or empty list in the same time."); } // Verify the stream object header end related requirements. this.ExpectStreamObjectHeaderEnd(instance.StreamObjectHeaderEnd, instance.GetType(), site); this.ExpectCompoundObject(instance.StreamObjectHeaderStart, site); // Capture requirement MS-FSSHTTPB_R374, if the stream object end header is StreamObjectHeaderEnd8bit. site.CaptureRequirementIfAreEqual<Type>( typeof(StreamObjectHeaderEnd8bit), instance.StreamObjectHeaderEnd.GetType(), "MS-FSSHTTPB", 374, @"[In Cell Knowledge] Cell Knowledge End (1 byte): An 8-bit stream object header (section 2.2.1.5.3) that specifies the cell knowledge end."); }