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

VerifyRopReadPerUserInformationSuccessResponse() private method

Verify RopReadPerUserInformation Success Response
private VerifyRopReadPerUserInformationSuccessResponse ( RopReadPerUserInformationResponse ropReadPerUserInformationResponse, byte inputHandleIndex ) : void
ropReadPerUserInformationResponse RopReadPerUserInformationResponse The success response of RopReadPerUserInformation request
inputHandleIndex byte The field of InputHandleIndex in RopReadPerUserInformation request
return void
        private void VerifyRopReadPerUserInformationSuccessResponse(RopReadPerUserInformationResponse ropReadPerUserInformationResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R476");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R478
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopReadPerUserInformation,
                ropReadPerUserInformationResponse.RopId,
                478,
                @"[In RopReadPerUserInformation ROP Success Response Buffer] RopId (1 byte): For this operation[RopReadPerUserInformation], this field[RopId (1 byte)] is set to 0x63.");

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

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R480
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropReadPerUserInformationResponse.InputHandleIndex,
                480,
                @"[In RopReadPerUserInformation ROP Success Response Buffer] InputHandleIndex (1 byte): This index 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_R481");

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

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

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

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R484,HasFinished:{0}", ropReadPerUserInformationResponse.HasFinished);

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R484
            // If HasFinished is of the byte type and can be represented by the boolean type, then Verify R484
            bool isVerifyR484 = (typeof(byte) == ropReadPerUserInformationResponse.HasFinished.GetType()) &&
                                ((Convert.ToBoolean(ropReadPerUserInformationResponse.HasFinished) == true) ||
                                (Convert.ToBoolean(ropReadPerUserInformationResponse.HasFinished) == false));

            Site.CaptureRequirementIfIsTrue(
                isVerifyR484,
                484,
                @"[In RopReadPerUserInformation ROP Success Response Buffer] HasFinished (1 byte): A Boolean.");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R486
            Site.CaptureRequirementIfAreEqual<Type>(
                typeof(ushort),
                ropReadPerUserInformationResponse.DataSize.GetType(),
                486,
                @"[In RopReadPerUserInformation ROP Success Response Buffer] DataSize (2 bytes): An unsigned integer.");
        }
MS_OXCROPSAdapter