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

The base class of scenario class.
Inheritance: Microsoft.Protocols.TestTools.TestClassBase
Show file Open project: OfficeDev/Interop-TestSuites

Protected Methods

Method Description
AddContact ( string collectionId, object>.Dictionary contactProperties ) : SyncStore

This method is used to add a contact to server.

GetInitialSyncKey ( string collectionId, Request supportedElements ) : string

This method is used to get the initial syncKey of the specified folder.

GetItemOperationsResult ( string collectionId, string serverId, Request bodyPreference, Request schema ) : ItemOperations

This method is used to fetch item with specified serverId on the server.

GetSearchResult ( string fileAs, string collectionId, Request bodyPreference ) : Search

Search item with specified criteria on the server.

GetSyncAddResult ( string subject, string collectionId, Request bodyPreference, Request supported ) : Sync

This method is used to synchronize item with specified subject.

GetSyncChangeResult ( string fileAs, string collectionId, string syncKey, Request bodyPreference ) : Sync

This method is used to get the changed item from server.

RecordCaseRelativeItems ( string userName, string folderCollectionId ) : void

Record the user name, folder collectionId and subjects the current test case impacts.

SendEmail ( string subject, string body ) : void

The method is used to send a mail

SetContactProperties ( string picture ) : object>.Dictionary

This method is used to set value for contact properties.

SwitchUser ( UserInformation userInformation, bool isFolderSyncNeeded ) : void

This method is used to change user to call ActiveSync commands and resynchronize the folder collection hierarchy.

TestCleanup ( ) : void

Clean up the test case

TestInitialize ( ) : void

Initialize the test case

UpdateContact ( string syncKey, string collectionId, Request changeData ) : void

This method is used to update the contact properties.

VerifyContactClassElements ( object>.Dictionary contactProperties, Microsoft.Protocols.TestSuites.Common.DataStructures contact ) : void

This method is used to verify the Contact class elements that returned from Sync, ItemOperations or Search command response.

Private Methods

Method Description
DeleteItemsInFolder ( Collection createdItemsCollection ) : void

Delete all the items in a folder.

FolderSync ( ) : FolderSyncResponse

This method is used to synchronize the folder collection hierarchy.

Method Details

AddContact() protected method

This method is used to add a contact to server.
protected AddContact ( string collectionId, object>.Dictionary contactProperties ) : SyncStore
collectionId string The collectionId of the folder which the contact is added to.
contactProperties object>.Dictionary The dictionary for contact properties and its values.
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

GetInitialSyncKey() protected method

This method is used to get the initial syncKey of the specified folder.
protected GetInitialSyncKey ( string collectionId, Request supportedElements ) : string
collectionId string The collection id of the specified folder.
supportedElements Microsoft.Protocols.TestSuites.Common.Request The elements in Supported element.
return string

GetItemOperationsResult() protected method

This method is used to fetch item with specified serverId on the server.
protected GetItemOperationsResult ( string collectionId, string serverId, Request bodyPreference, Request schema ) : ItemOperations
collectionId string The collection id.
serverId string The server id of the mail.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request The bodyPreference in the options element.
schema Microsoft.Protocols.TestSuites.Common.Request The Schema of the item to be fetched.
return Microsoft.Protocols.TestSuites.Common.DataStructures.ItemOperations

GetSearchResult() protected method

Search item with specified criteria on the server.
protected GetSearchResult ( string fileAs, string collectionId, Request bodyPreference ) : Search
fileAs string The FileAs of the item.
collectionId string The collection id.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request The bodyPreference in the options element.
return Microsoft.Protocols.TestSuites.Common.DataStructures.Search

GetSyncAddResult() protected method

This method is used to synchronize item with specified subject.
protected GetSyncAddResult ( string subject, string collectionId, Request bodyPreference, Request supported ) : Sync
subject string The subject of the item.
collectionId string The collection id which to sync with.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request The bodyPreference in the options element.
supported Microsoft.Protocols.TestSuites.Common.Request The elements in Supported element.
return Microsoft.Protocols.TestSuites.Common.DataStructures.Sync

GetSyncChangeResult() protected method

This method is used to get the changed item from server.
protected GetSyncChangeResult ( string fileAs, string collectionId, string syncKey, Request bodyPreference ) : Sync
fileAs string The FileAs of the contact.
collectionId string The collectionId of the folder that store the contact.
syncKey string The syncKey of the last Sync response.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request The bodyPreference in the options element.
return Microsoft.Protocols.TestSuites.Common.DataStructures.Sync

RecordCaseRelativeItems() protected method

Record the user name, folder collectionId and subjects the current test case impacts.
protected RecordCaseRelativeItems ( string userName, string folderCollectionId ) : void
userName string The user that current test case used.
folderCollectionId string The collectionId of folder that the current test case impact.
return void

SendEmail() protected method

The method is used to send a mail
protected SendEmail ( string subject, string body ) : void
subject string The subject of the mail.
body string The body of the item.
return void

SetContactProperties() protected method

This method is used to set value for contact properties.
protected SetContactProperties ( string picture ) : object>.Dictionary
picture string The picture of the contact item.
return object>.Dictionary

SwitchUser() protected method

This method is used to change user to call ActiveSync commands and resynchronize the folder collection hierarchy.
protected SwitchUser ( UserInformation userInformation, bool isFolderSyncNeeded ) : void
userInformation UserInformation The information of the user that will switch to.
isFolderSyncNeeded bool A boolean value indicates whether needs to synchronize the folder hierarchy.
return void

TestCleanup() protected method

Clean up the test case
protected TestCleanup ( ) : void
return void

TestInitialize() protected method

Initialize the test case
protected TestInitialize ( ) : void
return void

UpdateContact() protected method

This method is used to update the contact properties.
protected UpdateContact ( string syncKey, string collectionId, Request changeData ) : void
syncKey string The SyncKey returned form last Sync response.
collectionId string The collectionId of folder that the item belongs to.
changeData Microsoft.Protocols.TestSuites.Common.Request The change data.
return void

VerifyContactClassElements() protected method

This method is used to verify the Contact class elements that returned from Sync, ItemOperations or Search command response.
protected VerifyContactClassElements ( object>.Dictionary contactProperties, Microsoft.Protocols.TestSuites.Common.DataStructures contact ) : void
contactProperties object>.Dictionary The contact properties.
contact Microsoft.Protocols.TestSuites.Common.DataStructures The contact item returned from server.
return void