C# Class Microsoft.Protocols.TestSuites.MS_OXCMSG.TestSuiteBase

Inheritance: Microsoft.Protocols.TestTools.TestClassBase
Show file Open project: OfficeDev/Interop-TestSuites

Protected Properties

Property Type Description
insideObjHandle uint
isNotNeedCleanupPrivateMailbox bool
rawData byte[]
response object
retryCount int
waitTime int

Protected Methods

Method Description
AddPermission ( string userEssdn, uint memberRights, uint folderHandle ) : void

Add a permission for a user to the permission list of the specified folder.

AddRecipients ( List recipientRows, uint messageHandle, PropertyTag propertyTag ) : void

Add recipients to specific message.

AddRecipients ( List recipientRows, uint messageHandle, PropertyTag propertyTag, RopModifyRecipientsResponse &modifyRecipientsResponse ) : void

Add recipients to specific message.

CheckMapiHttpIsSupported ( ) : void

Check whether support MS-OXCMAPIHTTP transport.

ConnectToServer ( ConnectionType connectionType ) : void

Connect to the server for RPC calling.

CreateAttachment ( uint objectHandle, RopCreateAttachmentResponse &createAttachmentResponse, uint &attachmentId ) : uint

Create an attachment of the given message.

CreateMessageTaggedPropertyValueArrays ( int &size, PidTagAttachMethodFlags valueOfPidTagAttachMethodFlags ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

Create an array of TaggedPropertyValue for message.

CreateModifyRecipientRow ( string name, uint rowId ) : ModifyRecipientRow

Create Recipient Array

CreateModifyRecipientRow ( string name, uint rowId, RecipientType recipientType ) : ModifyRecipientRow

Create Recipient Array

CreateRecipientColumns ( string name ) : PropertyRow

Create RecipientColumns

CreateRecipientColumns ( ) : Microsoft.Protocols.TestSuites.Common.PropertyTag[]

Create RecipientColumns

CreateSubFolder ( uint parentFolderHandle, ulong &subFolderId ) : uint

Create a subfolder under specified folder.

CreateSubFolder ( uint parentFolderHandle ) : ulong

Create a subfolder under specific folder.

CreatedMessage ( ulong folderId, uint logonHandle ) : uint

Get Created Message Handle

CreatedMessage ( ulong folderId, uint logonHandle, RopCreateMessageResponse &createMessageResponse ) : uint

Get Created Message Handle

GetContentTableSuccess ( uint objHandle ) : RopGetContentsTableResponse

Get the content table of specific folder.

GetLongTermIdFormID ( ulong objectId, uint logonHandle ) : LongTermId

Get the LongTermId form specified object ID.

GetObjectIdFormLongTermID ( LongTermId longTermID, uint logonHandle ) : ulong

Get the object ID form specified LongTermId.

GetSpecificPropertiesOfMessage ( ulong folderId, ulong messageId, uint objectHandle, List propertyList ) : List

Get value of specific properties in Message object.

GetSpecificPropertiesOfMessage ( uint messageHandle, List propertyList ) : RopGetPropertiesSpecificResponse

Get value of specific properties in Message object.

Logon ( LogonType logonType, uint &objHandle ) : RopLogonResponse

Call RopLogon to establish a logon session between the client and the server.

OpenSpecificFolder ( ulong folderId, uint logonHandle ) : uint

Get Opened Folder Handle

OpenSpecificMessage ( ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags ) : uint

Open a specific message.

OpenSpecificMessage ( ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags, RopOpenMessageResponse &openMessageResponse ) : uint

Open a specific message.

QueryRowsSuccess ( uint objHandle ) : RopQueryRowsResponse

Query the rows of specific table.

ReleaseRop ( uint handle ) : void

Release resources.

SaveAttachment ( uint objectHandle, RopSaveChangesAttachmentResponse &saveChangesAttachmentReponse ) : void

Save the attachment.

SaveMessage ( uint messagesHandle, byte saveFlags ) : RopSaveChangesMessageResponse

Save Message

SetColumnsSuccess ( PropertyTag propertyTags, uint objHandle ) : void

Set the specified columns that want to be returned.

SetPropertiesForMessage ( uint messageHandle, List pts ) : void

Set properties' value for a message

SetPropertiesForMessage ( uint messageHandle, List pts, RopSetPropertiesResponse &rpmSetResponse ) : void

Set properties' value for a message

TestCleanup ( ) : void

Test cleanup method

TestInitialize ( ) : void

Test initialization

WaitEmailBeDelivered ( string title, ulong folderId, uint logonHandle, ulong &messageId ) : bool

Wait email be delivered to Inbox folder.

WaitEmailBeDelivered ( uint objectHandle, uint messageCountBeforeDelivery ) : bool

Wait email be delivered to Inbox folder.

Private Methods

Method Description
CleanFolder ( ulong folderID ) : void

Clean the Inbox folder in private mailbox.

CreateEntryIdProperty ( string userEssdn ) : TaggedPropertyValue

Generate the EntryId for modify the permissions.

CreateModifyPermissionsRequestBuffer ( PermissionData permissionsDataArray, ModifyFlags modifyFlags ) : RopModifyPermissionsRequest

Create buffer to get RopModifyPermissions request.

CreateRightsProperty ( uint nrights ) : TaggedPropertyValue

Create TaggedProperty by integer rights.

DetermineMessageExist ( string title, ulong folderId, uint logonHandle, ulong &messageID ) : bool

Determine the specified message whether has existed in specified folder.

GetEntryId ( string userEssdn ) : byte[]

Get EntryId by user ESSDN.

GetPermissionDataArrayForAdd ( string userEssdn, uint rights ) : PermissionData[]

Set the PermissionData Array for adding by the permissionUserName and permissionRight

Method Details

AddPermission() protected method

Add a permission for a user to the permission list of the specified folder.
protected AddPermission ( string userEssdn, uint memberRights, uint folderHandle ) : void
userEssdn string UserDN used to connect server.
memberRights uint The permission value.
folderHandle uint The specified folder object handle.
return void

AddRecipients() protected method

Add recipients to specific message.
protected AddRecipients ( List recipientRows, uint messageHandle, PropertyTag propertyTag ) : void
recipientRows List The list of ModifyRecipientRow.
messageHandle uint The Server object handle of Message.
propertyTag Microsoft.Protocols.TestSuites.Common.PropertyTag The properties of Recipient
return void

AddRecipients() protected method

Add recipients to specific message.
protected AddRecipients ( List recipientRows, uint messageHandle, PropertyTag propertyTag, RopModifyRecipientsResponse &modifyRecipientsResponse ) : void
recipientRows List The list of ModifyRecipientRow.
messageHandle uint The Server object handle of Message.
propertyTag Microsoft.Protocols.TestSuites.Common.PropertyTag The properties of Recipient
modifyRecipientsResponse RopModifyRecipientsResponse The response of calling RopModifyRecipients.
return void

CheckMapiHttpIsSupported() protected method

Check whether support MS-OXCMAPIHTTP transport.
protected CheckMapiHttpIsSupported ( ) : void
return void

ConnectToServer() protected method

Connect to the server for RPC calling.
protected ConnectToServer ( ConnectionType connectionType ) : void
connectionType ConnectionType The type of connection
return void

CreateAttachment() protected method

Create an attachment of the given message.
protected CreateAttachment ( uint objectHandle, RopCreateAttachmentResponse &createAttachmentResponse, uint &attachmentId ) : uint
objectHandle uint A Server object handle.
createAttachmentResponse Microsoft.Protocols.TestSuites.Common.RopCreateAttachmentResponse The RopCreateAttachmentResponse value.
attachmentId uint The created attachment ID.
return uint

CreateMessageTaggedPropertyValueArrays() protected method

Create an array of TaggedPropertyValue for message.
protected CreateMessageTaggedPropertyValueArrays ( int &size, PidTagAttachMethodFlags valueOfPidTagAttachMethodFlags ) : Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]
size int The size of TaggedPropertyValue array.
valueOfPidTagAttachMethodFlags PidTagAttachMethodFlags Flags of PidTagAttachMethod property.
return Microsoft.Protocols.TestSuites.Common.TaggedPropertyValue[]

CreateModifyRecipientRow() protected method

Create Recipient Array
protected CreateModifyRecipientRow ( string name, uint rowId ) : ModifyRecipientRow
name string Recipient name value
rowId uint RowId value
return ModifyRecipientRow

CreateModifyRecipientRow() protected method

Create Recipient Array
protected CreateModifyRecipientRow ( string name, uint rowId, RecipientType recipientType ) : ModifyRecipientRow
name string Recipient name value
rowId uint RowId value
recipientType RecipientType Recipient type value
return ModifyRecipientRow

CreateRecipientColumns() protected method

Create RecipientColumns
protected CreateRecipientColumns ( string name ) : PropertyRow
name string Recipient name
return Microsoft.Protocols.TestSuites.Common.PropertyRow

CreateRecipientColumns() protected method

Create RecipientColumns
protected CreateRecipientColumns ( ) : Microsoft.Protocols.TestSuites.Common.PropertyTag[]
return Microsoft.Protocols.TestSuites.Common.PropertyTag[]

CreateSubFolder() protected method

Create a subfolder under specified folder.
protected CreateSubFolder ( uint parentFolderHandle, ulong &subFolderId ) : uint
parentFolderHandle uint The specified parent folder handle.
subFolderId ulong Output the subfolder Id.
return uint

CreateSubFolder() protected method

Create a subfolder under specific folder.
protected CreateSubFolder ( uint parentFolderHandle ) : ulong
parentFolderHandle uint The Server object handle of parent folder.
return ulong

CreatedMessage() protected method

Get Created Message Handle
protected CreatedMessage ( ulong folderId, uint logonHandle ) : uint
folderId ulong The folder Id be used to create message
logonHandle uint The RopLogon object handle
return uint

CreatedMessage() protected method

Get Created Message Handle
protected CreatedMessage ( ulong folderId, uint logonHandle, RopCreateMessageResponse &createMessageResponse ) : uint
folderId ulong The folder Id be used to create message
logonHandle uint The RopLogon object handle
createMessageResponse RopCreateMessageResponse The response of calling RopCreateMessage
return uint

GetContentTableSuccess() protected method

Get the content table of specific folder.
protected GetContentTableSuccess ( uint objHandle ) : RopGetContentsTableResponse
objHandle uint The handle of specific folder.
return RopGetContentsTableResponse

GetLongTermIdFormID() protected method

Get the LongTermId form specified object ID.
protected GetLongTermIdFormID ( ulong objectId, uint logonHandle ) : LongTermId
objectId ulong The specified object ID.
logonHandle uint The logon handle.
return LongTermId

GetObjectIdFormLongTermID() protected method

Get the object ID form specified LongTermId.
protected GetObjectIdFormLongTermID ( LongTermId longTermID, uint logonHandle ) : ulong
longTermID LongTermId The specified LongTermID.
logonHandle uint The logon handle.
return ulong

GetSpecificPropertiesOfMessage() protected method

Get value of specific properties in Message object.
protected GetSpecificPropertiesOfMessage ( ulong folderId, ulong messageId, uint objectHandle, List propertyList ) : List
folderId ulong The folder ID.
messageId ulong The message handle.
objectHandle uint The object handle.
propertyList List The specific properties list.
return List

GetSpecificPropertiesOfMessage() protected method

Get value of specific properties in Message object.
protected GetSpecificPropertiesOfMessage ( uint messageHandle, List propertyList ) : RopGetPropertiesSpecificResponse
messageHandle uint The message handle.
propertyList List The specific properties list.
return RopGetPropertiesSpecificResponse

Logon() protected method

Call RopLogon to establish a logon session between the client and the server.
protected Logon ( LogonType logonType, uint &objHandle ) : RopLogonResponse
logonType LogonType LogonType value
objHandle uint Unsigned integer value
return RopLogonResponse

OpenSpecificFolder() protected method

Get Opened Folder Handle
protected OpenSpecificFolder ( ulong folderId, uint logonHandle ) : uint
folderId ulong The folder id be used to open folder
logonHandle uint The RopLogon handle
return uint

OpenSpecificMessage() protected method

Open a specific message.
protected OpenSpecificMessage ( ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags ) : uint
folderId ulong The folder Id of specific folder that contains specific message.
messageId ulong The message id of specific message.
objectHandle uint A Server object handle.
openFlags MessageOpenModeFlags The OpenModeFlags value.
return uint

OpenSpecificMessage() protected method

Open a specific message.
protected OpenSpecificMessage ( ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags, RopOpenMessageResponse &openMessageResponse ) : uint
folderId ulong The folder Id of specific folder that contains specific message.
messageId ulong The message id of specific message.
objectHandle uint A Server object handle.
openFlags MessageOpenModeFlags The OpenModeFlags value.
openMessageResponse RopOpenMessageResponse The response of RopOpenMessage.
return uint

QueryRowsSuccess() protected method

Query the rows of specific table.
protected QueryRowsSuccess ( uint objHandle ) : RopQueryRowsResponse
objHandle uint The handle of specific table.
return RopQueryRowsResponse

ReleaseRop() protected method

Release resources.
protected ReleaseRop ( uint handle ) : void
handle uint Unsigned integer value indicates the Server object Handle
return void

SaveAttachment() protected method

Save the attachment.
protected SaveAttachment ( uint objectHandle, RopSaveChangesAttachmentResponse &saveChangesAttachmentReponse ) : void
objectHandle uint A Server object handle.
saveChangesAttachmentReponse RopSaveChangesAttachmentResponse The RopSaveChangesAttachmentResponse value.
return void

SaveMessage() protected method

Save Message
protected SaveMessage ( uint messagesHandle, byte saveFlags ) : RopSaveChangesMessageResponse
messagesHandle uint An unsigned integer value indicates a Message object handle.
saveFlags byte A byte value indicates value of SaveFlags.
return RopSaveChangesMessageResponse

SetColumnsSuccess() protected method

Set the specified columns that want to be returned.
protected SetColumnsSuccess ( PropertyTag propertyTags, uint objHandle ) : void
propertyTags PropertyTag The specified columns.
objHandle uint The object handle.
return void

SetPropertiesForMessage() protected method

Set properties' value for a message
protected SetPropertiesForMessage ( uint messageHandle, List pts ) : void
messageHandle uint Unsigned integer value indicates a message object handle.
pts List PropertyObj list value
return void

SetPropertiesForMessage() protected method

Set properties' value for a message
protected SetPropertiesForMessage ( uint messageHandle, List pts, RopSetPropertiesResponse &rpmSetResponse ) : void
messageHandle uint Unsigned integer value indicates a message object handle.
pts List PropertyObj list value
rpmSetResponse RopSetPropertiesResponse The response of calling RopSetProperties.
return void

TestCleanup() protected method

Test cleanup method
protected TestCleanup ( ) : void
return void

TestInitialize() protected method

Test initialization
protected TestInitialize ( ) : void
return void

WaitEmailBeDelivered() protected method

Wait email be delivered to Inbox folder.
protected WaitEmailBeDelivered ( string title, ulong folderId, uint logonHandle, ulong &messageId ) : bool
title string The message subject of specified message
folderId ulong The specified folder ID.
logonHandle uint The logon handle.
messageId ulong The value of message ID.
return bool

WaitEmailBeDelivered() protected method

Wait email be delivered to Inbox folder.
protected WaitEmailBeDelivered ( uint objectHandle, uint messageCountBeforeDelivery ) : bool
objectHandle uint The Server object handle of inbox folder.
messageCountBeforeDelivery uint The message count in inbox before this message be delivered
return bool

Property Details

insideObjHandle protected property

Object handle
protected uint insideObjHandle
return uint

isNotNeedCleanupPrivateMailbox protected property

The boolean value indicates that the case does not need cleanup.
protected bool isNotNeedCleanupPrivateMailbox
return bool

rawData protected property

rawData byte
protected byte[] rawData
return byte[]

response protected property

The response object
protected object response
return object

retryCount protected property

The retry count that is used by the test suite to find the message item after it sends out.
protected int retryCount
return int

waitTime protected property

The time internal (millisecond) that is used by the test suite to find the message item after it sends out.
protected int waitTime
return int