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

A class contains all helper methods used in test cases.
Показать файл Открыть проект Примеры использования класса

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

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

Try to parse the no separator time string to DateTime

ConvertSyncResponseFromSendString ( ActiveSyncResponseBase syncResponseString ) : SyncResponse

Convert the instance of SendStringResponse to SyncResponse.

CreateCalendarContent ( string fromAddress, string toAddress, string meetingRequestSubject, string occurrences ) : string

Get the calendar content string.

GetPolicyKeyFromSendString ( ActiveSyncResponseBase provisionResponseString ) : string

Get policy key from Provision string response.

GetServerIdFromSyncResponse ( SyncStore syncResponse, string subject ) : string

Get ServerId from Sync response.

GetStatusCodeFromException ( Exception webException ) : string

Get status code from web exception which will be returned by IIS.

GetSyncRequest ( string collectionId, string syncKey ) : SyncRequest

Get the request of Sync command.

IsRetryNeeded ( string shouldBeGotten ) : bool

Get whether retry is needed when get ServerId.

LoadAddCommands ( Response collectionCommands ) : Collection

Load add commands in sync response.

LoadSyncResponse ( ActiveSyncResponseBase response ) : SyncStore

Load sync response to sync store.

VerifySyncRequiredResponseHeaders ( string headers ) : bool

Verify whether X-MS-RP, MS-ASProtocolCommands and MS-ASProtocolVersions headers all exist in response headers.

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

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

Try to parse the no separator time string to DateTime
public static ConvertInstanceIdFormat ( string time ) : string
time string The specified DateTime string
Результат string

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

Convert the instance of SendStringResponse to SyncResponse.
public static ConvertSyncResponseFromSendString ( ActiveSyncResponseBase syncResponseString ) : SyncResponse
syncResponseString ActiveSyncResponseBase The SendStringResponse instance to convert.
Результат SyncResponse

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

Get the calendar content string.
public static CreateCalendarContent ( string fromAddress, string toAddress, string meetingRequestSubject, string occurrences ) : string
fromAddress string The email address of the meeting request sender.
toAddress string The email address of the meeting request receiver.
meetingRequestSubject string The subject of the meeting request.
occurrences string The number of occurrences of the meeting request.
Результат string

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

Get policy key from Provision string response.
public static GetPolicyKeyFromSendString ( ActiveSyncResponseBase provisionResponseString ) : string
provisionResponseString ActiveSyncResponseBase The SendStringResponse instance of Provision command.
Результат string

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

Get ServerId from Sync response.
public static GetServerIdFromSyncResponse ( SyncStore syncResponse, string subject ) : string
syncResponse SyncStore The response of Sync command.
subject string The subject of the email to get.
Результат string

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

Get status code from web exception which will be returned by IIS.
public static GetStatusCodeFromException ( Exception webException ) : string
webException System.Exception Web exception
Результат string

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

Get the request of Sync command.
public static GetSyncRequest ( string collectionId, string syncKey ) : SyncRequest
collectionId string The CollectionId of the folder to sync.
syncKey string The SyncKey of the latest sync.
Результат SyncRequest

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

Get whether retry is needed when get ServerId.
public static IsRetryNeeded ( string shouldBeGotten ) : bool
shouldBeGotten string Whether the item should be gotten.
Результат bool

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

Load add commands in sync response.
public static LoadAddCommands ( Response collectionCommands ) : Collection
collectionCommands Microsoft.Protocols.TestSuites.Common.Response The add commands response.
Результат Collection

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

Load sync response to sync store.
public static LoadSyncResponse ( ActiveSyncResponseBase response ) : SyncStore
response ActiveSyncResponseBase The response of Sync command.
Результат SyncStore

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

Verify whether X-MS-RP, MS-ASProtocolCommands and MS-ASProtocolVersions headers all exist in response headers.
public static VerifySyncRequiredResponseHeaders ( string headers ) : bool
headers string The headers returned from response.
Результат bool