public void MSOXCFOLD_S03_TC09_RopGetHierarchyTableFailure()
{
this.CheckWhetherSupportTransport();
this.Adapter.DoConnect(ConnectionType.PrivateMailboxServer);
this.GenericFolderInitialization();
#region Step 1. The client calls RopGetHierarchyTable with a logon object handle rather than a folder handle.
RopGetHierarchyTableRequest getHierarchyTableRequest = new RopGetHierarchyTableRequest
{
RopId = (byte)RopId.RopGetHierarchyTable,
LogonId = Constants.CommonLogonId,
InputHandleIndex = Constants.CommonInputHandleIndex,
OutputHandleIndex = Constants.CommonOutputHandleIndex,
TableFlags = (byte)FolderTableFlags.None
};
RopGetHierarchyTableResponse getHierarchyTableResponse = this.Adapter.GetHierarchyTable(getHierarchyTableRequest, this.LogonHandle, ref this.responseHandles);
#region Verify the requirements: MS-OXCFOLD_R657, MS-OXCFOLD_R658.
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCFOLD_R657");
// Verify MS-OXCFOLD requirement: MS-OXCFOLD_R657
Site.CaptureRequirementIfAreEqual<uint>(
0x80040102,
getHierarchyTableResponse.ReturnValue,
657,
@"[In Processing a RopGetHierarchyTable ROP Request]The value of error code ecNotSupported is 0x80040102.");
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCFOLD_R658");
// Verify MS-OXCFOLD requirement: MS-OXCFOLD_R658
Site.CaptureRequirementIfAreEqual<uint>(
0x80040102,
getHierarchyTableResponse.ReturnValue,
658,
@"[In Processing a RopGetHierarchyTable ROP Request] When the error code is ecNotSupported, it indicates that the object that this ROP [RopGetHierarchyTable ROP] was called on is not a Folder object.");
#endregion
#endregion
#region Step 2. The client calls RopGetHierarchyTable with invalid 'TableFlags'.
getHierarchyTableRequest.TableFlags = 0x03;
getHierarchyTableResponse = this.Adapter.GetHierarchyTable(getHierarchyTableRequest, this.RootFolderHandle, ref this.responseHandles);
#region Verify the requirements: MS-OXCFOLD_R314002, MS-OXCFOLD_R314001.
if (Common.IsRequirementEnabled(314002, this.Site))
{
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCFOLD_R314002");
// Verify MS-OXCFOLD requirement: MS-OXCFOLD_R314002
Site.CaptureRequirementIfAreEqual<uint>(
0x80040102,
getHierarchyTableResponse.ReturnValue,
314002,
@"[In Appendix A: Product Behavior] If the client sets an invalid bit in the TableFlags field, implementation fails the ROP[RopGetHierarchyTable] with an error code of ecNotSupported(0x80040102). (Microsoft Exchange 2010 and above follow this behavior.)");
}
if (Common.IsRequirementEnabled(314001, this.Site))
{
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCFOLD_R314001");
// Verify MS-OXCFOLD requirement: MS-OXCFOLD_R314001
Site.CaptureRequirementIfAreEqual<uint>(
Constants.SuccessCode,
getHierarchyTableResponse.ReturnValue,
314001,
@"[In Appendix A: Product Behavior] If the client sets an invalid bit in the TableFlags field, implementation does not fail the ROP[RopGetHierarchyTable]. <19> Section 3.2.5.13: Exchange 2007 ignores invalid bits instead of failing the ROP.");
}
#endregion
#endregion
}