C# Класс Microsoft.Protocols.TestSuites.MS_ASEMAIL.TestSuiteHelper

A static class contains all helper methods used in test cases.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetClientId ( ) : string

Get client id for send mail

Приватные методы

Метод Описание
BytesToHex ( byte bytes ) : string

Convert a byte array into an equivalent hex string. E.g. [0xXX, 0xYY]=>"XXYY"

BytesToHex ( byte bytes, int startIndex, int count ) : string

Convert a byte array into an equivalent hex string at the specified starting position and count

CreateAttendees ( string attendeeEmail ) : Attendees

Create a Request.Attendees instance by the attendee email address.

CreateDefaultCalendar ( string subject, string organizerEmailAddress, string attendeeEmailAddress ) : Calendar

Create one sample calendar object

CreateItemOperationsFetchRequest ( string collectionId, string serverId, Request bodyPreference, Request bodyPartPreference, Request schema ) : ItemOperationsRequest

Builds a ItemOperations request to fetch the whole content of a single mail item by using the specified collectionId, emailServerId,bodyPreference and bodyPartPreference In general, returns the XML formatted ItemOperations request as follows:

CreateMeetingRequestMime ( string from, string to, string subject, string body, string icalendarContent ) : string

Create a meeting request mime

CreateMeetingResponseiCalendarFormatContent ( System.DateTime startTime, System.DateTime endTime, string uid, string subject, string location, string replyto, string from ) : string

Create meeting response mail iCalendarContent

CreatePlainTextMime ( string from, string to, string cc, string bcc, string subject, string body, string sender = null, string replyTo = null ) : string

Create a sample plain text mime

CreateSearchRequest ( string keyword, string folderCollectionId ) : SearchRequest

Builds a Search request on the Mailbox store by using the specified keyword and folder collection ID In general, returns the XML formatted search request as follows:

CreateSendMailRequest ( string clientId, bool copyToSentItems, string mime ) : SendMailRequest

Builds a SendMail request by using the specified client Id, copyToSentItems option and mail mime content. In general, returns the XML formatted Sync request as follows:

CreateSmartForwardRequest ( string sourceFolderId, string sourceServerId, string forwardMime ) : SmartForwardRequest

Builds a SmartForward request by using the specified source folder Id, source server Id and forward mime information. In general, returns the XML formatted Sync request as follows:

CreateSmartReplyRequest ( string sourceFolderId, string sourceServerId, string replyMime ) : SmartReplyRequest

Builds a SmartReply request by using the specified source folder Id, source server Id and reply mime information. In general, returns the XML formatted Sync request as follows:

CreateSyncAddRequest ( string syncKey, string collectionId, Request addData ) : SyncRequest

Builds a Sync add request by using the specified sync key, folder collection ID and add application data. In general, returns the XMl formatted Sync request as follows:

CreateSyncChangeData ( bool read, string serverId, Request flag, Collection categories ) : SyncCollectionChange

Create an instance of SyncCollectionChange

CreateSyncChangeRequest ( string syncKey, string collectionId, Request changeData ) : SyncRequest

Builds a Sync change request by using the specified sync key, folder collection ID and change application data. In general, returns the XML formatted Sync request as follows:

CreateSyncCollection ( string syncKey, string collectionId ) : SyncCollection

Create an instance of SyncCollection

CreateSyncRequest ( string syncKey, string collectionId, Request bodyPreference ) : SyncRequest

Build a generic Sync request without command references by using the specified sync key, folder collection ID and body preference option. If syncKey is In general, returns the XML formatted Sync request as follows:

CreateVoiceAttachmentMime ( string from, string to, string subject, string body, string callNumber, string firstVoiceFilePath, string secondVoiceFilePath ) : string

Create a MIME with two electronic voice mail attachments. Note: When writing X-AttachmentOrder header value, the attachment name retrieved from [secondVoiceAttachmentPath] will be added after the name retrieved from [firstVoiceAttachmentPath].

CreateiCalendarFormatCancelContent ( Calendar calendar ) : string

Create iCalendar format string from one calendar instance for cancel one occurrence of a meeting request

CreateiCalendarFormatContent ( Calendar calendar ) : string

Create iCalendar format string from one calendar instance

GenerateOutlookID ( System.DateTime createTime ) : string

Generate an outlook id.

GetItemOperationsItem ( ItemOperationsStore itemOperationsResult, string subject ) : ItemOperations

Get the email item from the ItemOperations response by using the subject as the search criteria.

GetStatusCode ( string changeResponseXml ) : string

Get the Status code from the sync change response string

GetSyncAddItem ( SyncStore syncResult, string subject ) : Sync

Get the specified email item from the sync add response by using the subject as the search criteria.

GetSyncChangeItem ( SyncStore syncResult, string serverId ) : Sync

Get the specified email item from the sync change response by using the subject as the search criteria.

IsOnlySpecifiedElement ( XmlElement rawResponseXml, string tagName, string elementName ) : bool

Check if the response message only contains the specified element in the specified xml tag.

SetMeetingProperties ( string subject, string attendeeEmailAddress, ITestSite testSite ) : object>.Dictionary

Set the value of common meeting properties

Описание методов

GetClientId() публичный статический Метод

Get client id for send mail
public static GetClientId ( ) : string
Результат string