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

A class contains all helper methods used in test cases.
Afficher le fichier Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

ConvertInstanceIdFormat() public static méthode

Try to parse the no separator time string to DateTime
public static ConvertInstanceIdFormat ( string time ) : string
time string The specified DateTime string
Résultat string

ConvertSyncResponseFromSendString() public static méthode

Convert the instance of SendStringResponse to SyncResponse.
public static ConvertSyncResponseFromSendString ( ActiveSyncResponseBase syncResponseString ) : SyncResponse
syncResponseString ActiveSyncResponseBase The SendStringResponse instance to convert.
Résultat SyncResponse

CreateCalendarContent() public static méthode

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.
Résultat string

GetPolicyKeyFromSendString() public static méthode

Get policy key from Provision string response.
public static GetPolicyKeyFromSendString ( ActiveSyncResponseBase provisionResponseString ) : string
provisionResponseString ActiveSyncResponseBase The SendStringResponse instance of Provision command.
Résultat string

GetServerIdFromSyncResponse() public static méthode

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.
Résultat string

GetStatusCodeFromException() public static méthode

Get status code from web exception which will be returned by IIS.
public static GetStatusCodeFromException ( Exception webException ) : string
webException System.Exception Web exception
Résultat string

GetSyncRequest() public static méthode

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.
Résultat SyncRequest

IsRetryNeeded() public static méthode

Get whether retry is needed when get ServerId.
public static IsRetryNeeded ( string shouldBeGotten ) : bool
shouldBeGotten string Whether the item should be gotten.
Résultat bool

LoadAddCommands() public static méthode

Load add commands in sync response.
public static LoadAddCommands ( Response collectionCommands ) : Collection
collectionCommands Microsoft.Protocols.TestSuites.Common.Response The add commands response.
Résultat Collection

LoadSyncResponse() public static méthode

Load sync response to sync store.
public static LoadSyncResponse ( ActiveSyncResponseBase response ) : SyncStore
response ActiveSyncResponseBase The response of Sync command.
Résultat SyncStore

VerifySyncRequiredResponseHeaders() public static méthode

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.
Résultat bool