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

Inheritance: Microsoft.Protocols.TestTools.TestClassBase
Afficher le fichier Open project: OfficeDev/Interop-TestSuites

Méthodes protégées

Méthode Description
AddCreatedItemToCollection ( string userName, string parentFolder, string itemSubject ) : void

Add the created item in test cases to the items collections used to clean up.

CallFolderCreateCommand ( string syncKey, string createdFolder, string parentFolder ) : FolderCreateResponse

Call FolderCreate command to create a sub folder under the specific parent folder.

CallFolderDeleteCommand ( string syncKey, string itemServerId ) : void

Call FolderDelete command to delete a folder from server.

CallFolderSyncCommand ( ) : FolderSyncResponse

Call FolderSync command and get the response.

CallFolderUpdateCommand ( string syncKey, string itemServerId, string folderName, string parentId ) : void

Call FolderUpdate command to rename a folder and move it to another location.

CallInitialSyncCommand ( string collectionId ) : SyncResponse

Call Sync command to synchronize changes in a folder between the client and the server with "0" SyncKey.

CallItemOperationsCommand ( string collectionId, string itemServerId, bool acceptMultiPart ) : SendStringResponse

Call ItemOperations command.

CallMeetingResponseCommand ( string collectionId, string itemServerId ) : void

Call MeetingResponse command to accept a meeting.

CallMoveItemsCommand ( string itemServerId, string sourceFolder, string destinationFolder ) : void

Call MoveItems command to move an item to another location.

CallPingCommand ( string collectionId ) : PingResponse

Call Ping command to request that the server monitor specified folder for changes.

CallProvisionCommand ( string policyKey ) : SendStringResponse

Call Provision command.

CallSearchCommand ( string collectionId, string freeText ) : SearchResponse

Call Search command to find email.

CallSendMailCommand ( string from, string to, string subject, string saveInSent ) : void

Call SendMail command to send mail to the server.

CallSmartForwardCommand ( string from, string forwardTo, string itemServerId, string forwardSubject, string saveInSent, string longId, string occurrence ) : void

Call SmartForward command to forward an email.

CallSmartReplyCommand ( string from, string replyTo, string itemServerId, string replySubject, string saveInSent, string longId, string occurrence ) : void

Call SmartReply command to reply an email.

CallSyncCommand ( string collectionId ) : SyncStore

Call Sync command to synchronize changes in a folder between the client and the server.

CheckResponseStatus ( string responseXML ) : void

Check the value of Status in response data xml.

GetElementValueFromSyncResponse ( string collectionId, string serverId, Response elementType ) : object

Get element value from Sync response

GetFolderFromFolderSyncResponse ( ActiveSyncResponseBase folderSyncResponse, string folderServerId, string elementName ) : string

Get the DisplayName or ParentId of the specified folder from FolderSync response.

IsXml ( string returnedValue ) : bool

Check whether the string returned from response is in xml format.

LoopToSearchItem ( string collectionId, string subject ) : SearchResponseStoreResult

Loop to get the LongId of the specific email by Search command.

LoopToSyncItem ( string folderCollectionId, string subject, bool isRetryNeeded ) : string

Loop to find the specific email by Sync command and return its serverId.

SendMeetingRequest ( string meetingRequestSubject ) : void

User3 sends meeting request with the specified subject to user2.

SwitchUser ( UserInformation userInformation, bool syncFolderHierarchy ) : void

Change the user authentication.

TestCleanup ( ) : void

Clean up the environment.

TestInitialize ( ) : void

Initialize the Test suite.

VerifyCollectionIdItemIdCommandParameters_SmartForward ( string itemServerId ) : void

Verify the capture codes about CollectionId and ItemId command parameters using in SmartForward command.

VerifyCollectionIdItemIdCommandParameters_SmartReply ( string itemServerId ) : void

Verify the capture codes about CollectionId and ItemId command parameters using in SmartReply command.

VerifyGetAttachmentsCommandParameter ( QueryValueType queryValueType ) : SendStringResponse

Verify the GetAttachment command parameter.

VerifyLongIdCommandParameter ( QueryValueType queryValueType ) : void

Verify the LongId command parameter.

VerifySaveInSentCommandParameter ( QueryValueType queryValueType, string sendMailSaveInSent, string smartForwardSaveInSent, string smartReplySaveInSent ) : void

Verify the SaveInSent command parameter.

VerifySaveInSentCommandParameter_SendMail ( QueryValueType queryValueType, string itemServerId ) : void

Verify the capture codes about SaveInSent command parameter using in SendMail command.

VerifySaveInSentCommandParameter_SmartForward ( QueryValueType queryValueType, string itemServerId ) : void

Verify the capture codes about SaveInSent command parameter using in SmartForward command.

VerifySaveInSentCommandParameter_SmartReply ( QueryValueType queryValueType, string itemServerId ) : void

Verify the capture codes about SaveInSent command parameter using in SmartReply command.

Private Methods

Méthode Description
DeleteCreatedItems ( Collection itemsToDelete ) : void

Delete the specified item.

GetFileReferenceFromSearchResult ( Response result ) : string

Get the FileReference element of an attachment from search response.

InitializeRequestPrefixField ( ) : void

Initialize the HTTP POST request prefix field.

Method Details

AddCreatedItemToCollection() protected méthode

Add the created item in test cases to the items collections used to clean up.
protected AddCreatedItemToCollection ( string userName, string parentFolder, string itemSubject ) : void
userName string The identity of the user who has the item.
parentFolder string The CollectionId of the folder which the item is placed.
itemSubject string The subject of the item to delete.
Résultat void

CallFolderCreateCommand() protected méthode

Call FolderCreate command to create a sub folder under the specific parent folder.
protected CallFolderCreateCommand ( string syncKey, string createdFolder, string parentFolder ) : FolderCreateResponse
syncKey string The SyncKey of the latest sync.
createdFolder string The folder name of the sub folder to create.
parentFolder string The ServerId of the parent folder.
Résultat FolderCreateResponse

CallFolderDeleteCommand() protected méthode

Call FolderDelete command to delete a folder from server.
protected CallFolderDeleteCommand ( string syncKey, string itemServerId ) : void
syncKey string The SyncKey of the latest sync.
itemServerId string The ServerId of the folder to delete.
Résultat void

CallFolderSyncCommand() protected méthode

Call FolderSync command and get the response.
protected CallFolderSyncCommand ( ) : FolderSyncResponse
Résultat FolderSyncResponse

CallFolderUpdateCommand() protected méthode

Call FolderUpdate command to rename a folder and move it to another location.
protected CallFolderUpdateCommand ( string syncKey, string itemServerId, string folderName, string parentId ) : void
syncKey string The SyncKey of the latest sync.
itemServerId string The ServerId of the folder to update.
folderName string The new name of the folder.
parentId string The ServerId of the parent folder.
Résultat void

CallInitialSyncCommand() protected méthode

Call Sync command to synchronize changes in a folder between the client and the server with "0" SyncKey.
protected CallInitialSyncCommand ( string collectionId ) : SyncResponse
collectionId string The CollectionId of the folder to sync.
Résultat SyncResponse

CallItemOperationsCommand() protected méthode

Call ItemOperations command.
protected CallItemOperationsCommand ( string collectionId, string itemServerId, bool acceptMultiPart ) : SendStringResponse
collectionId string The CollectionId of the folder.
itemServerId string The ServerId of the email to be fetched.
acceptMultiPart bool Whether need the server to return the requested item in multipart format. It is used in Base64 query value type.
Résultat SendStringResponse

CallMeetingResponseCommand() protected méthode

Call MeetingResponse command to accept a meeting.
protected CallMeetingResponseCommand ( string collectionId, string itemServerId ) : void
collectionId string The CollectionId of the folder in which the meeting request is placed.
itemServerId string The ServerId of the meeting request.
Résultat void

CallMoveItemsCommand() protected méthode

Call MoveItems command to move an item to another location.
protected CallMoveItemsCommand ( string itemServerId, string sourceFolder, string destinationFolder ) : void
itemServerId string The ServerId of the email to move.
sourceFolder string The ServerId of the folder to move from.
destinationFolder string The ServerId of the folder to move to.
Résultat void

CallPingCommand() protected méthode

Call Ping command to request that the server monitor specified folder for changes.
protected CallPingCommand ( string collectionId ) : PingResponse
collectionId string The CollectionId of the server monitor specified folder.
Résultat PingResponse

CallProvisionCommand() protected méthode

Call Provision command.
protected CallProvisionCommand ( string policyKey ) : SendStringResponse
policyKey string The policy key.
Résultat SendStringResponse

CallSearchCommand() protected méthode

Call Search command to find email.
protected CallSearchCommand ( string collectionId, string freeText ) : SearchResponse
collectionId string The CollectionId of the folder to search.
freeText string The key words to search.
Résultat Microsoft.Protocols.TestSuites.Common.Response.SearchResponse

CallSendMailCommand() protected méthode

Call SendMail command to send mail to the server.
protected CallSendMailCommand ( string from, string to, string subject, string saveInSent ) : void
from string The mailbox address of sender.
to string The mailbox address of recipient.
subject string The subject of the email.
saveInSent string The value of SaveInSent command parameter.
Résultat void

CallSmartForwardCommand() protected méthode

Call SmartForward command to forward an email.
protected CallSmartForwardCommand ( string from, string forwardTo, string itemServerId, string forwardSubject, string saveInSent, string longId, string occurrence ) : void
from string The mailbox address of sender.
forwardTo string The mailbox address of recipient.
itemServerId string The ServerId of the email to forward.
forwardSubject string The subject of the email to forward.
saveInSent string The value of SaveInSent command parameter.
longId string The value of LongId command parameter.
occurrence string The value of Occurrence command parameter.
Résultat void

CallSmartReplyCommand() protected méthode

Call SmartReply command to reply an email.
protected CallSmartReplyCommand ( string from, string replyTo, string itemServerId, string replySubject, string saveInSent, string longId, string occurrence ) : void
from string The mailbox address of sender.
replyTo string The mailbox address recipient.
itemServerId string The ServerId of the email to forward.
replySubject string The subject of the email to reply.
saveInSent string The value of SaveInSent command parameter.
longId string The value of LongId command parameter.
occurrence string The value of Occurrence command parameter.
Résultat void

CallSyncCommand() protected méthode

Call Sync command to synchronize changes in a folder between the client and the server.
protected CallSyncCommand ( string collectionId ) : SyncStore
collectionId string The CollectionId of the folder to sync.
Résultat SyncStore

CheckResponseStatus() protected méthode

Check the value of Status in response data xml.
protected CheckResponseStatus ( string responseXML ) : void
responseXML string The response data xml.
Résultat void

GetElementValueFromSyncResponse() protected méthode

Get element value from Sync response
protected GetElementValueFromSyncResponse ( string collectionId, string serverId, Response elementType ) : object
collectionId string The specified collectionId of the folder
serverId string The specified serverId
elementType Microsoft.Protocols.TestSuites.Common.Response The element type
Résultat object

GetFolderFromFolderSyncResponse() protected méthode

Get the DisplayName or ParentId of the specified folder from FolderSync response.
protected GetFolderFromFolderSyncResponse ( ActiveSyncResponseBase folderSyncResponse, string folderServerId, string elementName ) : string
folderSyncResponse ActiveSyncResponseBase The FolderSync response.
folderServerId string The ServerId of the folder to get.
elementName string The element name of the folder to get, it should be DisplayName or ParentId.
Résultat string

IsXml() protected méthode

Check whether the string returned from response is in xml format.
protected IsXml ( string returnedValue ) : bool
returnedValue string The string returned from response.
Résultat bool

LoopToSearchItem() protected méthode

Loop to get the LongId of the specific email by Search command.
protected LoopToSearchItem ( string collectionId, string subject ) : SearchResponseStoreResult
collectionId string The CollectionId of the folder to search.
subject string The subject of the email to get.
Résultat Microsoft.Protocols.TestSuites.Common.Response.SearchResponseStoreResult

LoopToSyncItem() protected méthode

Loop to find the specific email by Sync command and return its serverId.
protected LoopToSyncItem ( string folderCollectionId, string subject, bool isRetryNeeded ) : string
folderCollectionId string The CollectionId of the folder to sync.
subject string The subject of the email to get.
isRetryNeeded bool Whether retry is needed when get the specified email.
Résultat string

SendMeetingRequest() protected méthode

User3 sends meeting request with the specified subject to user2.
protected SendMeetingRequest ( string meetingRequestSubject ) : void
meetingRequestSubject string The subject of the meeting request.
Résultat void

SwitchUser() protected méthode

Change the user authentication.
protected SwitchUser ( UserInformation userInformation, bool syncFolderHierarchy ) : void
userInformation UserInformation The information of a user.
syncFolderHierarchy bool Whether sync folder hierarchy or not.
Résultat void

TestCleanup() protected méthode

Clean up the environment.
protected TestCleanup ( ) : void
Résultat void

TestInitialize() protected méthode

Initialize the Test suite.
protected TestInitialize ( ) : void
Résultat void

VerifyCollectionIdItemIdCommandParameters_SmartForward() protected méthode

Verify the capture codes about CollectionId and ItemId command parameters using in SmartForward command.
protected VerifyCollectionIdItemIdCommandParameters_SmartForward ( string itemServerId ) : void
itemServerId string The ServerId of the email received by the receiver.
Résultat void

VerifyCollectionIdItemIdCommandParameters_SmartReply() protected méthode

Verify the capture codes about CollectionId and ItemId command parameters using in SmartReply command.
protected VerifyCollectionIdItemIdCommandParameters_SmartReply ( string itemServerId ) : void
itemServerId string The ServerId of the email received by the receiver.
Résultat void

VerifyGetAttachmentsCommandParameter() protected méthode

Verify the GetAttachment command parameter.
protected VerifyGetAttachmentsCommandParameter ( QueryValueType queryValueType ) : SendStringResponse
queryValueType QueryValueType The query value type of the request.
Résultat SendStringResponse

VerifyLongIdCommandParameter() protected méthode

Verify the LongId command parameter.
protected VerifyLongIdCommandParameter ( QueryValueType queryValueType ) : void
queryValueType QueryValueType The query value type of the request.
Résultat void

VerifySaveInSentCommandParameter() protected méthode

Verify the SaveInSent command parameter.
protected VerifySaveInSentCommandParameter ( QueryValueType queryValueType, string sendMailSaveInSent, string smartForwardSaveInSent, string smartReplySaveInSent ) : void
queryValueType QueryValueType The query value type of the request.
sendMailSaveInSent string The value of the SaveInSent command parameter in SendMail command.
smartForwardSaveInSent string The value of the SaveInSent command parameter in SmartForward command.
smartReplySaveInSent string The value of the SaveInSent command parameter in SmartReply command.
Résultat void

VerifySaveInSentCommandParameter_SendMail() protected méthode

Verify the capture codes about SaveInSent command parameter using in SendMail command.
protected VerifySaveInSentCommandParameter_SendMail ( QueryValueType queryValueType, string itemServerId ) : void
queryValueType QueryValueType The query value type of the request.
itemServerId string The ServerId of the email received by the receiver.
Résultat void

VerifySaveInSentCommandParameter_SmartForward() protected méthode

Verify the capture codes about SaveInSent command parameter using in SmartForward command.
protected VerifySaveInSentCommandParameter_SmartForward ( QueryValueType queryValueType, string itemServerId ) : void
queryValueType QueryValueType The query value type of the request.
itemServerId string The ServerId of the email received by the receiver.
Résultat void

VerifySaveInSentCommandParameter_SmartReply() protected méthode

Verify the capture codes about SaveInSent command parameter using in SmartReply command.
protected VerifySaveInSentCommandParameter_SmartReply ( QueryValueType queryValueType, string itemServerId ) : void
queryValueType QueryValueType The query value type of the request.
itemServerId string The ServerId of the email received by the receiver.
Résultat void