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

Inheritance: Microsoft.Protocols.TestTools.TestClassBase
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Protected Methods

Method 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

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

Method Details

GenerateRandomValue() protected method

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

GetAlerToDoTaskData() protected method

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.
return System.Xml.XmlElement

GetStartWorkflowParameter() protected method

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.
return System.Xml.XmlElement

GetStartWorkflowParameterForClaim() protected method

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

GetStartworkflowDatafileName() protected method

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.
return string

GetUserNameFromConfigFile() protected method

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.
return string

GetZrowAttributeValueFromGetToDosForItemResponse() protected method

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.
return string

StartATaskWithNewFile() protected method

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.
return string

UploadFileToSut() protected method

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
return string

VerifyAssignToValueForSingleTodoItem() protected method

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".
return void

VerifyTaskDataOfNewUploadFile() protected method

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.
return void