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

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

Protected Properties

Property Type Description
cropsAdapter IMS_OXCROPSAdapter
inputObjHandle uint
propertyDictionary PropertyTag>.Dictionary
rawData byte[]
response IDeserializable
responseSOHs List>
userDN string

Protected Methods

Method Description
CheckTransportIsSupported ( ) : void

Check the preconditions of this test suite.

CommitStream ( uint streamHandle ) : void

Commit Stream

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

Create Sample ContentsTable PropertyTags

CreateSampleRecipientColumnsAndRecipientRows ( PropertyTag &recipientColumns, ModifyRecipientRow &recipientRows ) : void

This method creates Sample RecipientColumns and Sample RecipientRows.

CreateSingleProcessEachLoop ( RopLogonResponse &logonResponse, uint &tableHandle, int count, RopCreateMessageRequest createMessageRequest, RopSaveChangesMessageRequest saveChangesMessageRequest, RopReleaseRequest releaseRequest ) : void

Create message each one loop In InBox

CreateVastMessages ( RopLogonResponse &logonResponse, uint &tableHandle, int count, RopCreateMessageRequest createMessageRequest, RopSaveChangesMessageRequest saveChangesMessageRequest, RopReleaseRequest releaseRequest ) : void

Create Vast Messages In InBox

GetContentsTableHandle ( uint targetFolderHandle ) : uint

Get ContentsTable Handle

GetCreatedMessageHandle ( ulong folderId, uint logonHandle ) : uint

Get Created Message Handle

GetFolderObjectHandle ( RopLogonResponse &logonResponse ) : uint

Get Folder Object Handle.

GetStatePropertyByIds ( ushort propertyId, ushort propertyTypeId ) : uint

Initialize StateProperty from property id and property type id.

GetSubfolderIDByName ( uint openedFolderHandle, string folderName ) : ulong

Find a folder ID in the specified folder and with specified display name.

HardDeleteMessagesAndSubfolders ( string userName, string passWord, string userEssdn, int folderIndex, bool needWaitMail = false ) : void

Hard delete messages and subfolders under the specified folder.

Logon ( LogonType logonType, string userDN, uint &objHandle ) : RopLogonResponse

This method is used to log on to a private mailbox or public folder and will be called before other ROPs

PrepareRops ( RopLogonResponse logonResponse, RopCreateMessageRequest &createMessageRequest, RopSaveChangesMessageRequest &saveChangesMessageRequest, RopReleaseRequest &releaseRequest ) : void

Prepare the ROP request for RopCreateMessage, RopSaveChangesMessage and RopRelease.

SaveMessage ( uint messageHandle ) : void

Save Message

TestCleanup ( ) : void

Test cleanup.

TestInitialize ( ) : void

Test initialize.

Private Methods

Method Description
GetTableRowValue ( uint tableHandle, ushort rowCount, PropertyTag properties ) : List

Get the properties' value from the rows of the table.

InitDictionary ( PropertyNames propertyName, ushort propertyId, PropertyType propertyType, PropertyTag>.Dictionary &propertyTagDictionary ) : void

Initialize the properties into the dictionary.

PropertyDictionary ( ) : PropertyTag>.Dictionary

Add all property to dictionary for lookup.

Method Details

CheckTransportIsSupported() protected method

Check the preconditions of this test suite.
protected CheckTransportIsSupported ( ) : void
return void

CommitStream() protected method

Commit Stream
protected CommitStream ( uint streamHandle ) : void
streamHandle uint The opened stream handle
return void

CreateSampleContentsTablePropertyTags() protected method

Create Sample ContentsTable PropertyTags
protected CreateSampleContentsTablePropertyTags ( ) : Microsoft.Protocols.TestSuites.Common.PropertyTag[]
return Microsoft.Protocols.TestSuites.Common.PropertyTag[]

CreateSampleRecipientColumnsAndRecipientRows() protected method

This method creates Sample RecipientColumns and Sample RecipientRows.
protected CreateSampleRecipientColumnsAndRecipientRows ( PropertyTag &recipientColumns, ModifyRecipientRow &recipientRows ) : void
recipientColumns Microsoft.Protocols.TestSuites.Common.PropertyTag Sample RecipientColumns
recipientRows ModifyRecipientRow Sample RecipientRows
return void

CreateSingleProcessEachLoop() protected method

Create message each one loop In InBox
protected CreateSingleProcessEachLoop ( RopLogonResponse &logonResponse, uint &tableHandle, int count, RopCreateMessageRequest createMessageRequest, RopSaveChangesMessageRequest saveChangesMessageRequest, RopReleaseRequest releaseRequest ) : void
logonResponse Microsoft.Protocols.TestSuites.Common.RopLogonResponse the logon response be used to create message
tableHandle uint The tableHanlder of the new folder
count int The count of created messages
createMessageRequest Microsoft.Protocols.TestSuites.Common.RopCreateMessageRequest The ROP CreateMessageRequest
saveChangesMessageRequest Microsoft.Protocols.TestSuites.Common.RopSaveChangesMessageRequest The ROP SaveChangesMessageRequest
releaseRequest Microsoft.Protocols.TestSuites.Common.RopReleaseRequest The ROP ReleaseRequest
return void

CreateVastMessages() protected method

Create Vast Messages In InBox
protected CreateVastMessages ( RopLogonResponse &logonResponse, uint &tableHandle, int count, RopCreateMessageRequest createMessageRequest, RopSaveChangesMessageRequest saveChangesMessageRequest, RopReleaseRequest releaseRequest ) : void
logonResponse Microsoft.Protocols.TestSuites.Common.RopLogonResponse the logon response be used to create message
tableHandle uint The tableHanlder of the new folder
count int The count of created messages
createMessageRequest Microsoft.Protocols.TestSuites.Common.RopCreateMessageRequest The ROP CreateMessageRequest
saveChangesMessageRequest Microsoft.Protocols.TestSuites.Common.RopSaveChangesMessageRequest The ROP SaveChangesMessageRequest
releaseRequest Microsoft.Protocols.TestSuites.Common.RopReleaseRequest The ROP ReleaseRequest
return void

GetContentsTableHandle() protected method

Get ContentsTable Handle
protected GetContentsTableHandle ( uint targetFolderHandle ) : uint
targetFolderHandle uint The target folder object handle
return uint

GetCreatedMessageHandle() protected method

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

GetFolderObjectHandle() protected method

Get Folder Object Handle.
protected GetFolderObjectHandle ( RopLogonResponse &logonResponse ) : uint
logonResponse Microsoft.Protocols.TestSuites.Common.RopLogonResponse The response of RopLogon
return uint

GetStatePropertyByIds() protected method

Initialize StateProperty from property id and property type id.
protected GetStatePropertyByIds ( ushort propertyId, ushort propertyTypeId ) : uint
propertyId ushort Property id
propertyTypeId ushort Property type id
return uint

GetSubfolderIDByName() protected method

Find a folder ID in the specified folder and with specified display name.
protected GetSubfolderIDByName ( uint openedFolderHandle, string folderName ) : ulong
openedFolderHandle uint Handle of the parent folder.
folderName string The folder display name.
return ulong

HardDeleteMessagesAndSubfolders() protected method

Hard delete messages and subfolders under the specified folder.
protected HardDeleteMessagesAndSubfolders ( string userName, string passWord, string userEssdn, int folderIndex, bool needWaitMail = false ) : void
userName string The user name to be used to logon a specific mailbox
passWord string The user password to be used to logon a specific mailbox
userEssdn string The user Essdn to be used to logon a specific mailbox
folderIndex int The id of folder in which subfolders and messages should be deleted
needWaitMail bool Indicates whether need waiting the mail to be received. True means need waiting, otherwise not.
return void

Logon() protected method

This method is used to log on to a private mailbox or public folder and will be called before other ROPs
protected Logon ( LogonType logonType, string userDN, uint &objHandle ) : RopLogonResponse
logonType LogonType The logon type.
userDN string The user Essdn to be used to logon a specific mailbox
objHandle uint The Object handle.
return Microsoft.Protocols.TestSuites.Common.RopLogonResponse

PrepareRops() protected method

Prepare the ROP request for RopCreateMessage, RopSaveChangesMessage and RopRelease.
protected PrepareRops ( RopLogonResponse logonResponse, RopCreateMessageRequest &createMessageRequest, RopSaveChangesMessageRequest &saveChangesMessageRequest, RopReleaseRequest &releaseRequest ) : void
logonResponse Microsoft.Protocols.TestSuites.Common.RopLogonResponse The response of RopLogon.
createMessageRequest Microsoft.Protocols.TestSuites.Common.RopCreateMessageRequest The request of RopCreateMessage.
saveChangesMessageRequest Microsoft.Protocols.TestSuites.Common.RopSaveChangesMessageRequest The request of RopSaveChangesMessage.
releaseRequest Microsoft.Protocols.TestSuites.Common.RopReleaseRequest The request of RopRelease.
return void

SaveMessage() protected method

Save Message
protected SaveMessage ( uint messageHandle ) : void
messageHandle uint The message handle
return void

TestCleanup() protected method

Test cleanup.
protected TestCleanup ( ) : void
return void

TestInitialize() protected method

Test initialize.
protected TestInitialize ( ) : void
return void

Property Details

cropsAdapter protected property

Adapter object.
protected IMS_OXCROPSAdapter cropsAdapter
return IMS_OXCROPSAdapter

inputObjHandle protected property

Server object handle in request.
protected uint inputObjHandle
return uint

propertyDictionary protected property

The dictionary holds the PropertyTags
protected Dictionary propertyDictionary
return PropertyTag>.Dictionary

rawData protected property

The ROP response payload.
protected byte[] rawData
return byte[]

response protected property

ROP response objects.
protected IDeserializable response
return IDeserializable

responseSOHs protected property

Server objects handles in response.
protected List> responseSOHs
return List>

userDN protected property

This property is used to Logon a specific mailbox.
protected string userDN
return string