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

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

Protected Methods

Method Description
CreateDefaultCalendar ( string subject, string organizerEmailAddress, string attendeeEmailAddress, string calendarUID, System.DateTime timestamp, System.DateTime startTime, System.DateTime endTime ) : Calendar

Create a default calendar object in the current login user calendar folder

CreateSyncPermanentDeleteRequest ( string syncKey, string collectionId, string serverId ) : SyncRequest

Create a Sync delete operation request which would be used to delete items permanently.

GetSyncResult ( string emailSubject, string folderCollectionId, Request bodyPreference ) : SyncStore

Get the specified email item.

InitializeSync ( string collectionId ) : SyncStore

Initialize the sync with server

RecordCaseRelativeItems ( string userName, string folderCollectionId ) : void

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

SendMeetingRequest ( string subject, Calendar calendar ) : void

Send a meeting request email.

SendMeetingResponse ( Calendar calendar ) : void

Send a meeting response email

SendPlaintextEmail ( string subject, string cc, string bcc ) : void

Send a plain text email.

SendPlaintextEmail ( string subject, string cc, string bcc, string to, string sender, string replyTo, string from ) : void

Send a plain text email.

SwitchUser ( UserInformation userInformation, bool isFolderSyncNeeded ) : void

Change user to call ActiveSync operations and resynchronize the collection hierarchy.

SyncAddMeeting ( string calendarCollectionId, object>.Dictionary elementsToValueMap ) : void

Add a meeting to the server.

SyncChanges ( string syncKey, string collectionId, Request bodyPreference ) : SyncStore

Sync changes between client and server

TestCleanup ( ) : void

Override the base TestCleanup function

TestInitialize ( ) : void

Override the base TestInitialize function

UpdateEmail ( string collectionId, string syncKey, bool read, string serverId, Request flag, Collection categories ) : SyncStore

Update email

UpdateEmailWithMoreData ( string collectionId, string syncKey, bool read, string serverId, Request flag, Collection categories, string additionalElement, string insertTag ) : SendStringResponse

Update email with more data

Private Methods

Method Description
DeleteItemsInFolder ( UserInformation userInformation ) : void

Delete all the items in a folder.

Method Details

CreateDefaultCalendar() protected method

Create a default calendar object in the current login user calendar folder
protected CreateDefaultCalendar ( string subject, string organizerEmailAddress, string attendeeEmailAddress, string calendarUID, System.DateTime timestamp, System.DateTime startTime, System.DateTime endTime ) : Calendar
subject string The calendar subject
organizerEmailAddress string The organizer email address
attendeeEmailAddress string The attendee email address
calendarUID string The uid of calendar
timestamp System.DateTime The DtStamp of calendar
startTime System.DateTime The StartTime of calendar
endTime System.DateTime The EndTime of calendar
return Calendar

CreateSyncPermanentDeleteRequest() protected static method

Create a Sync delete operation request which would be used to delete items permanently.
protected static CreateSyncPermanentDeleteRequest ( string syncKey, string collectionId, string serverId ) : SyncRequest
syncKey string The synchronization state of a collection.
collectionId string The server ID of the folder.
serverId string The server ID of the item which will be deleted.
return SyncRequest

GetSyncResult() protected method

Get the specified email item.
protected GetSyncResult ( string emailSubject, string folderCollectionId, Request bodyPreference ) : SyncStore
emailSubject string The subject of the email item.
folderCollectionId string The serverId of the default folder.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request The preference information related to the type and size of information that is returned from fetching.
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

InitializeSync() protected method

Initialize the sync with server
protected InitializeSync ( string collectionId ) : SyncStore
collectionId string Specify the folder collection Id which needs to be synced.
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

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 folders that the current test case impact.
return void

SendMeetingRequest() protected method

Send a meeting request email.
protected SendMeetingRequest ( string subject, Calendar calendar ) : void
subject string The subject of email
calendar Calendar The meeting calendar
return void

SendMeetingResponse() protected method

Send a meeting response email
protected SendMeetingResponse ( Calendar calendar ) : void
calendar Calendar The meeting calendar
return void

SendPlaintextEmail() protected method

Send a plain text email.
protected SendPlaintextEmail ( string subject, string cc, string bcc ) : void
subject string The subject of email
cc string The cc address of the mail
bcc string The bcc address of the mail
return void

SendPlaintextEmail() protected method

Send a plain text email.
protected SendPlaintextEmail ( string subject, string cc, string bcc, string to, string sender, string replyTo, string from ) : void
subject string The subject of email
cc string The cc address of the mail
bcc string The bcc address of the mail
to string The to address of the mail
sender string The sender address of the mail
replyTo string The replyTo address of the mail
from string The from address of the mail
return void

SwitchUser() protected method

Change user to call ActiveSync operations and resynchronize the collection hierarchy.
protected SwitchUser ( UserInformation userInformation, bool isFolderSyncNeeded ) : void
userInformation UserInformation The information of the user.
isFolderSyncNeeded bool A Boolean value that indicates whether needs to synchronize the folder hierarchy.
return void

SyncAddMeeting() protected method

Add a meeting to the server.
protected SyncAddMeeting ( string calendarCollectionId, object>.Dictionary elementsToValueMap ) : void
calendarCollectionId string The collectionId of the folder which the item should be added.
elementsToValueMap object>.Dictionary The key and value pairs of common meeting properties.
return void

SyncChanges() protected method

Sync changes between client and server
protected SyncChanges ( string syncKey, string collectionId, Request bodyPreference ) : SyncStore
syncKey string The synchronization key returned by last request.
collectionId string Identify the folder as the collection being synchronized.
bodyPreference Microsoft.Protocols.TestSuites.Common.Request Sets preference information related to the type and size of information for body
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

TestCleanup() protected method

Override the base TestCleanup function
protected TestCleanup ( ) : void
return void

TestInitialize() protected method

Override the base TestInitialize function
protected TestInitialize ( ) : void
return void

UpdateEmail() protected method

Update email
protected UpdateEmail ( string collectionId, string syncKey, bool read, string serverId, Request flag, Collection categories ) : SyncStore
collectionId string The collectionId of the folder which contains the item to be updated.
syncKey string The syncKey which is returned from server
read bool The value is TRUE indicates the email has been read; a value of FALSE indicates the email has not been read
serverId string The server id of the email
flag Microsoft.Protocols.TestSuites.Common.Request The flag instance
categories Collection The array of categories
return Microsoft.Protocols.TestSuites.Common.DataStructures.SyncStore

UpdateEmailWithMoreData() protected method

Update email with more data
protected UpdateEmailWithMoreData ( string collectionId, string syncKey, bool read, string serverId, Request flag, Collection categories, string additionalElement, string insertTag ) : SendStringResponse
collectionId string The collectionId of the folder which contains the item to be updated.
syncKey string The syncKey which is returned from server
read bool The value is TRUE indicates the email has been read; a value of FALSE indicates the email has not been read
serverId string The server id of the email
flag Microsoft.Protocols.TestSuites.Common.Request The flag instance
categories Collection The list of categories
additionalElement string Additional flag element
insertTag string Additional element will insert before this tag
return SendStringResponse