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

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

Protected Methods

Method Description
AddView ( bool isDefault, Query queryType, ViewType viewType ) : string

Add a view to the list.

DeleteView ( string viewname ) : void

Delete the specific view.

DoCompare ( ViewDefinition viewDefinition1, ViewDefinition viewDefinition2 ) : bool

Performs the comparing based on instance's public contents between two instances, these two instances must be declared as the same class.

GenerateRandomString ( int size ) : string

A method used to generate random string in the range A-Z with the specified string size.

GetAggregationsDefinition ( bool isValueOn, bool hasValidAggregatingFieldRef, string aggregationType ) : AggregationsDefinition

Used to get the definition of Aggregations for a view.

GetAvailableRowLimitDefinition ( ) : RowLimitDefinition

Used to get the RowLimitDefinition of a view.

GetCamlQueryRoot ( Query query, bool isLookupId ) : CamlQueryRoot

Used to get the query of a view.

GetCamlQueryRootForGroupBy ( bool isCollapse ) : CamlQueryRoot

Used to get the query with GroupBy and OrderBy condition.

GetCamlQueryRootForWhere ( bool isLookupId ) : CamlQueryRoot

Used to get the query root element containing the where condition.

GetHtmlConfigure ( UpdateViewHtml2Toolbar &toolBar, UpdateViewHtml2ViewHeader &viewHeader, UpdateViewHtml2ViewBody &viewBody, UpdateViewHtml2ViewFooter &viewFooter, UpdateViewHtml2ViewEmpty &viewEmpty, UpdateViewHtml2RowLimitExceeded &rowLimitExceeded ) : void

A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml for the UpdateViewHtml2 operation.

GetHtmlConfigure ( UpdateViewHtmlToolbar &toolBar, UpdateViewHtmlViewHeader &viewHeader, UpdateViewHtmlViewBody &viewBody, UpdateViewHtmlViewFooter &viewFooter, UpdateViewHtmlViewEmpty &viewEmpty, UpdateViewHtmlRowLimitExceeded &rowLimitExceeded ) : void

A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml for the UpdateViewHtml operation.

GetViewFields ( bool isExplicit ) : FieldRefDefinitionView[]

Used to get the fields of the list referenced by the view.

GetViewFormatDefinitions ( ) : ViewFormatDefinitions

Used to get view's format definitions.

TestCleanup ( ) : void

Clean up the test.

TestInitialize ( ) : void

Initialize the test.

Private Methods

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

Delete the views created in the test case.

GetConfiguredElements ( string elementName, XmlDocument xmlDoc ) : System.Xml.XmlElement[]

Used to get all the XmlElements under the configured elementName.

RestoreOriginalDefaultView ( ) : void

Restore original default view's position.

SerializerHelp ( object targetObject, Type type ) : string

Helper function to serialize an object to string.

Method Details

AddView() protected method

Add a view to the list.
protected AddView ( bool isDefault, Query queryType, ViewType viewType ) : string
isDefault bool Represents whether this view is a default view.
queryType Query Represents the type of query condition of the view.
viewType ViewType Represents the type of the view to be created.
return string

DeleteView() protected method

Delete the specific view.
protected DeleteView ( string viewname ) : void
viewname string The GUID of the view.
return void

DoCompare() protected method

Performs the comparing based on instance's public contents between two instances, these two instances must be declared as the same class.
protected DoCompare ( ViewDefinition viewDefinition1, ViewDefinition viewDefinition2 ) : bool
viewDefinition1 ViewDefinition The first instance to be compared.
viewDefinition2 ViewDefinition The second instance to be compared.
return bool

GenerateRandomString() protected method

A method used to generate random string in the range A-Z with the specified string size.
protected GenerateRandomString ( int size ) : string
size int A parameter represents the generated string size.
return string

GetAggregationsDefinition() protected method

Used to get the definition of Aggregations for a view.
protected GetAggregationsDefinition ( bool isValueOn, bool hasValidAggregatingFieldRef, string aggregationType ) : AggregationsDefinition
isValueOn bool Specify whether the Aggregation's value is On or Off.
hasValidAggregatingFieldRef bool Specify whether there is a valid FieldRef.
aggregationType string Only meaningful when the hasValidAggregatingFieldRef is True, specify the Aggregation Type
return AggregationsDefinition

GetAvailableRowLimitDefinition() protected method

Used to get the RowLimitDefinition of a view.
protected GetAvailableRowLimitDefinition ( ) : RowLimitDefinition
return RowLimitDefinition

GetCamlQueryRoot() protected method

Used to get the query of a view.
protected GetCamlQueryRoot ( Query query, bool isLookupId ) : CamlQueryRoot
query Query Specify the type of Query.
isLookupId bool Explicitly specify whether the field referenced in the logical test query condition is a look up field.
return CamlQueryRoot

GetCamlQueryRootForGroupBy() protected method

Used to get the query with GroupBy and OrderBy condition.
protected GetCamlQueryRootForGroupBy ( bool isCollapse ) : CamlQueryRoot
isCollapse bool Indicate whether the result set is collapsed.
return CamlQueryRoot

GetCamlQueryRootForWhere() protected method

Used to get the query root element containing the where condition.
protected GetCamlQueryRootForWhere ( bool isLookupId ) : CamlQueryRoot
isLookupId bool Explicitly specify whether the field referenced in the logical test query condition is a look up field.
return CamlQueryRoot

GetHtmlConfigure() protected method

A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml for the UpdateViewHtml2 operation.
protected GetHtmlConfigure ( UpdateViewHtml2Toolbar &toolBar, UpdateViewHtml2ViewHeader &viewHeader, UpdateViewHtml2ViewBody &viewBody, UpdateViewHtml2ViewFooter &viewFooter, UpdateViewHtml2ViewEmpty &viewEmpty, UpdateViewHtml2RowLimitExceeded &rowLimitExceeded ) : void
toolBar UpdateViewHtml2Toolbar The outer UpdateViewHtml2Toolbar instance.
viewHeader UpdateViewHtml2ViewHeader The outer UpdateViewHtml2ViewHeader instance.
viewBody UpdateViewHtml2ViewBody The outer UpdateViewHtml2ViewBody instance.
viewFooter UpdateViewHtml2ViewFooter The outer UpdateViewHtml2ViewFooter instance.
viewEmpty UpdateViewHtml2ViewEmpty The outer UpdateViewHtml2ViewEmpty instance.
rowLimitExceeded UpdateViewHtml2RowLimitExceeded The outer UpdateViewHtml2RowLimitExceeded instance.
return void

GetHtmlConfigure() protected method

A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml for the UpdateViewHtml operation.
protected GetHtmlConfigure ( UpdateViewHtmlToolbar &toolBar, UpdateViewHtmlViewHeader &viewHeader, UpdateViewHtmlViewBody &viewBody, UpdateViewHtmlViewFooter &viewFooter, UpdateViewHtmlViewEmpty &viewEmpty, UpdateViewHtmlRowLimitExceeded &rowLimitExceeded ) : void
toolBar UpdateViewHtmlToolbar The outer UpdateViewHtmlToolbar instance.
viewHeader UpdateViewHtmlViewHeader The outer UpdateViewHtmlViewHeader instance.
viewBody UpdateViewHtmlViewBody The outer UpdateViewHtmlViewBody instance.
viewFooter UpdateViewHtmlViewFooter The outer UpdateViewHtmlViewFooter instance.
viewEmpty UpdateViewHtmlViewEmpty The outer UpdateViewHtmlViewEmpty instance.
rowLimitExceeded UpdateViewHtmlRowLimitExceeded The outer UpdateViewHtmlRowLimitExceeded instance.
return void

GetViewFields() protected method

Used to get the fields of the list referenced by the view.
protected GetViewFields ( bool isExplicit ) : FieldRefDefinitionView[]
isExplicit bool Represents whether it is explicit.
return FieldRefDefinitionView[]

GetViewFormatDefinitions() protected method

Used to get view's format definitions.
protected GetViewFormatDefinitions ( ) : ViewFormatDefinitions
return ViewFormatDefinitions

TestCleanup() protected method

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

TestInitialize() protected method

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