Microsoft.Protocols.TestSuites.MS_OXCROPS.MS_OXCROPSAdapter.VerifyRopSortTableSuccessResponse C# (CSharp) Method

VerifyRopSortTableSuccessResponse() private method

Verify RopSortTable Success Response
private VerifyRopSortTableSuccessResponse ( RopSortTableResponse ropSortTableResponse, byte inputHandleIndex ) : void
ropSortTableResponse RopSortTableResponse The response of RopSortTable request
inputHandleIndex byte The field of InputHandleIndex in RopSortTable request
return void
        private void VerifyRopSortTableSuccessResponse(RopSortTableResponse ropSortTableResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1104");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1104
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropSortTableResponse.RopId.GetType(),
                1104,
                @"[In RopSortTable ROP Success Response Buffer] RopId (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1106");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1106
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopSortTable,
                ropSortTableResponse.RopId,
                1106,
                @"[In RopSortTable ROP Success Response Buffer] RopId (1 byte): For this operation[RopSortTable], this field[RopId (1 byte)] is set to 0x13.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1107");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1107
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropSortTableResponse.InputHandleIndex.GetType(),
                1107,
                @"[In RopSortTable ROP Success Response Buffer] InputHandleIndex (1 byte): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1108");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1108
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropSortTableResponse.InputHandleIndex,
                1108,
                @"[In RopSortTable ROP Success Response Buffer] InputHandleIndex (1 byte): This index that MUST be set to the value specified in the InputHandleIndex field in the request.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1109");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1109
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(uint),
                ropSortTableResponse.ReturnValue.GetType(),
                1109,
                @"[In RopSortTable ROP Success Response Buffer] ReturnValue (4 bytes): An unsigned integer.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1111");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1111
            Site.CaptureRequirementIfAreEqual<uint>(
                SuccessReturnValue,
                ropSortTableResponse.ReturnValue,
                1111,
                @"[In RopSortTable ROP Success Response Buffer] ReturnValue (4 bytes): For this response[Success Response], this field is set to 0x00000000.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1112");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1112
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(byte),
                ropSortTableResponse.TableStatus.GetType(),
                1112,
                @"[In RopSortTable ROP Success Response Buffer] TableStatus (1 byte): An enumeration.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R1113,TableStatus:{0}", ropSortTableResponse.TableStatus);

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R1113
            bool isVerifyR1113 = ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatComplete)) == ((byte)TableStatus.TblstatComplete))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatSorting)) == ((byte)TableStatus.TblstatSorting))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatSortError)) == ((byte)TableStatus.TblstatSortError))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatSettingCols)) == ((byte)TableStatus.TblstatSettingCols))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatSetColError)) == ((byte)TableStatus.TblstatSetColError))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatRestricting)) == ((byte)TableStatus.TblstatRestricting))
                                 || ((ropSortTableResponse.TableStatus & ((byte)TableStatus.TblstatRestrictError)) == ((byte)TableStatus.TblstatRestrictError));

            Site.CaptureRequirementIfIsTrue(
                isVerifyR1113,
                1113,
                @"[In RopSortTable ROP Success Response Buffer] TableStatus (1 byte): The possible values[the value of TBLSTAT_COMPLETE is 0x00, the value of TBLSTAT_SORTING is 0x09, the value of TBLSTAT_SORT_ERROR is 0x0A, the value of TBLSTAT_SETTING_COLS is 0x0B, the value of TBLSTAT_SETCOL_ERROR is 0x0D, the value of TBLSTAT_RESTRICTING is 0x0E and the value of TBLSTAT_RESTRICT_ERROR is 0x0F] for this enumeration are specified in [MS-OXCTABL] section 2.2.2.1.3.");
        }
MS_OXCROPSAdapter