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

Inheritance: Microsoft.Protocols.TestTools.TestClassBase
Afficher le fichier Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Méthodes protégées

Méthode Description
GenerateRandomValue ( ) : string

Generate a Random value base on GUID format, this value will not be duplicated.

GetAlerToDoTaskData ( ITestSite testsite, string alertValue ) : XmlElement

Get the AlerTodoTask data from alertToDo xml data file, and replace the "PlaceHolder" in xml data file with specified value. The "PlaceHolder" is specified in configuration file.

GetStartWorkflowParameter ( ITestSite testsite, string assignToUser ) : XmlElement

Get StartWorkflow Parameter from data file.

GetStartWorkflowParameterForClaim ( ITestSite testsite ) : XmlElement

Get GetStartWorkflowParameter data for Claim used.

GetStartworkflowDatafileName ( bool isForClaim ) : string

Get StartworkflowData file Name from configuration file according startworkflow type.

GetUserNameFromConfigFile ( bool isUserGroup ) : string

Get the user name of account from configuration file according the accountType.

GetZrowAttributeValueFromGetToDosForItemResponse ( GetToDosForItemResponseGetToDosForItemResult getToDosForItemResponse, int index, string expectedAttibuteName ) : string

Get z:row attribute value by specified attribute name from a GetToDosForItemResponse

StartATaskWithNewFile ( string uploadedFileUrl, bool isClaim ) : string

Start workflow task for specified document item and record the task id in order to cleanup the task in test suite clean up process.

UploadFileToSut ( string documentLibraryTitle ) : string

upload a file to the specified document library and record the file URL in order to cleanup the file in test suite clean up process.

VerifyAssignToValueForSingleTodoItem ( string uploadedFileUrl, int taskIndex ) : void

Verify a new upload file's task data, if there are any task data for a new upload file, method will throw a Assert.Fail exception.

VerifyTaskDataOfNewUploadFile ( string uploadedFileUrl ) : void

Verify a new upload file's task data, if there are any task data for a new upload file, method will throw a Assert.Fail exception.

Private Methods

Méthode Description
ClassCleanup ( ) : void
ClassInitialize ( Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext ) : void
TestSuiteBaseCleanUp ( ) : void
TestSuiteBaseInitialization ( ) : void

Method Details

GenerateRandomValue() protected méthode

Generate a Random value base on GUID format, this value will not be duplicated.
protected GenerateRandomValue ( ) : string
Résultat string

GetAlerToDoTaskData() protected méthode

Get the AlerTodoTask data from alertToDo xml data file, and replace the "PlaceHolder" in xml data file with specified value. The "PlaceHolder" is specified in configuration file.
protected GetAlerToDoTaskData ( ITestSite testsite, string alertValue ) : XmlElement
testsite ITestSite Transfer ITestSite into Adapter,Make adapter can use ITestSite's function.
alertValue string A parameter represent the value will be replaced to the "PlaceHolder" in alertToDo xml data file. The placeHolder value will be load from configuration file.
Résultat System.Xml.XmlElement

GetStartWorkflowParameter() protected méthode

Get StartWorkflow Parameter from data file.
protected GetStartWorkflowParameter ( ITestSite testsite, string assignToUser ) : XmlElement
testsite ITestSite Transfer ITestSite into Adapter,Make adapter can use ITestSite's function.
assignToUser string A parameter represent the value will be replaced to the "PlaceHolder" in startworkflowParameters xml data file. The placeHolder value will be load from configuration file. The task start from this start workflow parameter data, will assign to the value specified by this input parameter.
Résultat System.Xml.XmlElement

GetStartWorkflowParameterForClaim() protected méthode

Get GetStartWorkflowParameter data for Claim used.
protected GetStartWorkflowParameterForClaim ( ITestSite testsite ) : XmlElement
testsite ITestSite Transfer ITestSite into Adapter,Make adapter can use ITestSite's function.
Résultat System.Xml.XmlElement

GetStartworkflowDatafileName() protected méthode

Get StartworkflowData file Name from configuration file according startworkflow type.
protected GetStartworkflowDatafileName ( bool isForClaim ) : string
isForClaim bool A parameter represents whether the startworkflow is for claim, true means it is for claim.
Résultat string

GetUserNameFromConfigFile() protected méthode

Get the user name of account from configuration file according the accountType.
protected GetUserNameFromConfigFile ( bool isUserGroup ) : string
isUserGroup bool A parameter represents whether is UserGroup account type, true means it get a user group data.
Résultat string

GetZrowAttributeValueFromGetToDosForItemResponse() protected méthode

Get z:row attribute value by specified attribute name from a GetToDosForItemResponse
protected GetZrowAttributeValueFromGetToDosForItemResponse ( GetToDosForItemResponseGetToDosForItemResult getToDosForItemResponse, int index, string expectedAttibuteName ) : string
getToDosForItemResponse GetToDosForItemResponseGetToDosForItemResult A parameter represents a GetToDosForItemResponse which contain zrow Attribute Values.
index int A parameter represents the index of a zrow item in a zrow collection.It start on "Zero".
expectedAttibuteName string A parameter represents the attributeName of which value will be return.
Résultat string

StartATaskWithNewFile() protected méthode

Start workflow task for specified document item and record the task id in order to cleanup the task in test suite clean up process.
protected StartATaskWithNewFile ( string uploadedFileUrl, bool isClaim ) : string
uploadedFileUrl string A parameter represents a URL of document item where the task starts.
isClaim bool A parameter represents a Boolean value indicate whether the task is started for Claim usage.
Résultat string

UploadFileToSut() protected méthode

upload a file to the specified document library and record the file URL in order to cleanup the file in test suite clean up process.
protected UploadFileToSut ( string documentLibraryTitle ) : string
documentLibraryTitle string A parameter represents the title of a document library where the file upload
Résultat string

VerifyAssignToValueForSingleTodoItem() protected méthode

Verify a new upload file's task data, if there are any task data for a new upload file, method will throw a Assert.Fail exception.
protected VerifyAssignToValueForSingleTodoItem ( string uploadedFileUrl, int taskIndex ) : void
uploadedFileUrl string A parameter represents a URL of document item which the method check.
taskIndex int A parameter represents the index of a z:row item in a zrow collection. Each z:row item means a task item.It start on "Zero".
Résultat void

VerifyTaskDataOfNewUploadFile() protected méthode

Verify a new upload file's task data, if there are any task data for a new upload file, method will throw a Assert.Fail exception.
protected VerifyTaskDataOfNewUploadFile ( string uploadedFileUrl ) : void
uploadedFileUrl string A parameter represents a URL of document item which the method check.
Résultat void