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

VerifyRopGetStoreStateSuccessResponse() private method

Verify RopGetStoreState Success Response
private VerifyRopGetStoreStateSuccessResponse ( RopGetStoreStateResponse ropGetStoreStateResponse, byte inputHandleIndex ) : void
ropGetStoreStateResponse RopGetStoreStateResponse The success response of RopGetStoreState request
inputHandleIndex byte The field of InputHandleIndex in RopGetStoreState request
return void
        private void VerifyRopGetStoreStateSuccessResponse(RopGetStoreStateResponse ropGetStoreStateResponse, byte inputHandleIndex)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R232");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R234
            Site.CaptureRequirementIfAreEqual<byte>(
                (byte)RopId.RopGetStoreState,
                ropGetStoreStateResponse.RopId,
                234,
                @"[In RopGetStoreState ROP Success Response Buffer] RopId (1 byte): For this operation[RopGetStoreState], this field[RopId (1 byte)] is set to 0x7B.");

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

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R236
            Site.CaptureRequirementIfAreEqual<byte>(
                inputHandleIndex,
                ropGetStoreStateResponse.InputHandleIndex,
                236,
                @"[In RopGetStoreState 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_R237");

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

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

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R239
            Site.CaptureRequirementIfAreEqual<uint>(
                SuccessReturnValue,
                ropGetStoreStateResponse.ReturnValue,
                239,
                @"[In RopGetStoreState 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_R240");

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R240
            Site.CaptureRequirementIfAreEqual<int>(
                4,
                Marshal.SizeOf(ropGetStoreStateResponse.StoreState.GetType()),
                240,
                @"[In RopGetStoreState ROP Success Response Buffer] StoreState (4 bytes): A flags structure that contains flags that indicate the state of the mailbox for the logged on user.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCROPS_R241,StoreState:{0}", ropGetStoreStateResponse.StoreState);

            // Verify MS-OXCROPS requirement: MS-OXCROPS_R241
            // The possible values' condition is in MS-OXCSTOR, verify StoreState is either 0x01000000 or 0x00000000. 
            bool isVerifyR241 = (ropGetStoreStateResponse.StoreState == (uint)StoreState.StoreHasSearches)
                || (ropGetStoreStateResponse.StoreState == (uint)StoreState.None);

            Site.CaptureRequirementIfIsTrue(
                isVerifyR241,
                241,
                @"[In RopGetStoreState ROP Success Response Buffer] StoreState (4 bytes): The possible values[0x01000000(STORE_HAS_SEARCHES), if the mailbox currently has any active search folders. Otherwise, 0x00000000.]are specified in [MS-OXCSTOR] section 2.2.1.5.2.");
        }
MS_OXCROPSAdapter