C# Class NUnit.Extensions.Asp.AspTester.DataGridTester

Tester for System.Web.UI.WebControls.DataGrid
Inheritance: AspControlTester
Mostra file Open project: vcsjones/NUnitAsp Class Usage Examples

Private Properties

Property Type Description
ChopOffHeader string[][]
GetRowTag HtmlTagTester

Public Methods

Method Description
DataGridTester ( string aspId ) : System

Create a tester for a top-level control. Use this constructor for testing most controls. Testers created with this constructor will test pages loaded by the HttpClient.Default HttpClient.

DataGridTester ( string aspId, Tester container ) : System

Create a tester for a nested control. Use this constructor when the control you are testing is nested within another control, such as a DataGrid or UserControl. You should also use this constructor when you're not using the HttpClient.Default HttpClient.

GetHeaderRow ( ) : Row

The data grid's header row. The first row is always assumed to be the header row.

GetRow ( int rowNumber ) : Row

Returns a row from the data grid. Row number zero is the first row after the header row.

GetRowByCellValue ( int columnNumber, string renderedValue ) : Row

Returns a row containing a specific cell. Looks for the cell as it is returned by RenderedCells.

Sort ( int columnNumberZeroBased ) : void

Click a column heading link that was generated with the "allowSorting='true'" attribute.

Protected Methods

Method Description
GetChildElementHtmlId ( string aspId ) : string

Private Methods

Method Description
ChopOffHeader ( string cells ) : string[][]
GetRowTag ( int rowNumber ) : HtmlTagTester

Method Details

DataGridTester() public method

Create a tester for a top-level control. Use this constructor for testing most controls. Testers created with this constructor will test pages loaded by the HttpClient.Default HttpClient.

public DataGridTester ( string aspId ) : System
aspId string The ID of the control to test (look in the /// page's ASP.NET source code for the ID).
return System

DataGridTester() public method

Create a tester for a nested control. Use this constructor when the control you are testing is nested within another control, such as a DataGrid or UserControl. You should also use this constructor when you're not using the HttpClient.Default HttpClient.
public DataGridTester ( string aspId, Tester container ) : System
aspId string The ID of the control to test (look in the /// page's ASP.NET source code for the ID).
container Tester A tester for the control's container. /// (In the page's ASP.NET source code, look for the tag that the /// control is nested in. That's probably the control's /// container.)
return System

GetChildElementHtmlId() protected method

protected GetChildElementHtmlId ( string aspId ) : string
aspId string
return string

GetHeaderRow() public method

The data grid's header row. The first row is always assumed to be the header row.
public GetHeaderRow ( ) : Row
return Row

GetRow() public method

Returns a row from the data grid. Row number zero is the first row after the header row.
public GetRow ( int rowNumber ) : Row
rowNumber int
return Row

GetRowByCellValue() public method

Returns a row containing a specific cell. Looks for the cell as it is returned by RenderedCells.
public GetRowByCellValue ( int columnNumber, string renderedValue ) : Row
columnNumber int The column containing the cell to look for (zero-based).
renderedValue string The cell to look for.
return Row

Sort() public method

Click a column heading link that was generated with the "allowSorting='true'" attribute.
public Sort ( int columnNumberZeroBased ) : void
columnNumberZeroBased int The column to sort (zero-based)
return void