Microsoft.Protocols.TestSuites.MS_OXCPRPT.MS_OXCPRPTAdapter.VerifyRopReadStreamWithLimitedSize C# (CSharp) Method

VerifyRopReadStreamWithLimitedSize() private method

Verify the RopReadStream operation related requirements.
private VerifyRopReadStreamWithLimitedSize ( RopReadStreamResponse readStreamResponse, ushort byteCount, uint maxByteCount ) : void
readStreamResponse Microsoft.Protocols.TestSuites.Common.RopReadStreamResponse The RopReadStream response buffer structure.
byteCount ushort Indicates the size to be read.
maxByteCount uint If byteCount is 0xBABE, use MaximumByteCount to determine the size to be read.
return void
        private void VerifyRopReadStreamWithLimitedSize(RopReadStreamResponse readStreamResponse, ushort byteCount, uint maxByteCount)
        {
            if (byteCount != 0xBABE)
            {
                Site.CaptureRequirementIfIsTrue(
                    readStreamResponse.DataSize <= byteCount,
                    2830201,
                    @"[In RopReadStream ROP Request Buffer] ByteCount: An integer that specifies the maximum number of bytes to be read unless the value is 0xBABE");

                Site.CaptureRequirementIfIsTrue(
                    readStreamResponse.DataSize <= byteCount,
                    55206,
                    @"[In Processing RopReadStream]otherwise[If the ByteCount field of the ROP request buffer isn't set to 0xBABE], the number of bytes read MUST be less than or equal to the value of the ByteCount field.");
            }
            else
            {
                Site.CaptureRequirementIfIsTrue(
                   readStreamResponse.DataSize <= maxByteCount,
                   2830401,
                   @"[In RopReadStream ROP Request Buffer] MaximumByteCount: An integer that specifies the maximum number of bytes to be read if the ByteCount field is set to 0xBABE. ");

                Site.CaptureRequirementIfIsTrue(
                  readStreamResponse.DataSize <= maxByteCount,
                  55205,
                  @"[In Processing RopReadStream] If the ByteCount field of the ROP request buffer is set to 0xBABE, the number of bytes read MUST be less than or equal to the value of the MaximumByteCount field of the ROP request buffer;");
            }
        }
        #endregion
MS_OXCPRPTAdapter