C# Class NUnit.Extensions.Forms.ListViewTester

A ControlTester for testing List Views.
It includes helper methods for selecting items from the list and for clearing those selections.
Inheritance: NUnit.Extensions.Forms.ControlTester
ファイルを表示 Open project: mRemoteNG/mRemoteNG Class Usage Examples

Public Methods

Method Description
ClearSelected ( ) : void

Clears the selections from the list box.

ListViewTester ( NUnit.Extensions.Forms.ControlTester tester, int index ) : System.Collections

Creates a ControlTester from a ControlTester and an index where the original tester's name is not unique.

It is best to use the overloaded Constructor that requires just the name parameter if possible.

ListViewTester ( string name ) : System.Collections

Creates a ControlTester from the control name.

This is the best constructor.

ListViewTester ( string name, Form form ) : System.Collections

Creates a ControlTester from the control name and the form instance.

It is best to use the overloaded Constructor that requires just the name parameter if possible.

ListViewTester ( string name, string formName ) : System.Collections

Creates a ControlTester from the control name and the form name.

It is best to use the overloaded Constructor that requires just the name parameter if possible.

Select ( int i ) : void

Selects an item in the ListBox according to its index.

Select ( string text ) : void

Selects an item in the list according to its string value.

SelectItems ( string items ) : void

Multiple selection of a range of items

SelectedItemsMatch ( string matches ) : bool

Test that only the indicated items are selected

this ( int index ) : ListViewTester

Allows you to find a ListViewTester by index where the name is not unique.

This was added to support the ability to find controls where their name is not unique. If all of your controls are uniquely named (I recommend this) then you will not need this.

Private Methods

Method Description
FindItemByString ( string text ) : int
ItemFound ( int index ) : bool

Method Details

ClearSelected() public method

Clears the selections from the list box.
public ClearSelected ( ) : void
return void

ListViewTester() public method

Creates a ControlTester from a ControlTester and an index where the original tester's name is not unique.
It is best to use the overloaded Constructor that requires just the name parameter if possible.
public ListViewTester ( NUnit.Extensions.Forms.ControlTester tester, int index ) : System.Collections
tester NUnit.Extensions.Forms.ControlTester The ControlTester.
index int The index to test.
return System.Collections

ListViewTester() public method

Creates a ControlTester from the control name.
This is the best constructor.
public ListViewTester ( string name ) : System.Collections
name string The Control name.
return System.Collections

ListViewTester() public method

Creates a ControlTester from the control name and the form instance.
It is best to use the overloaded Constructor that requires just the name parameter if possible.
public ListViewTester ( string name, Form form ) : System.Collections
name string The Control name.
form System.Windows.Forms.Form The Form instance.
return System.Collections

ListViewTester() public method

Creates a ControlTester from the control name and the form name.
It is best to use the overloaded Constructor that requires just the name parameter if possible.
public ListViewTester ( string name, string formName ) : System.Collections
name string The Control name.
formName string The Form name..
return System.Collections

Select() public method

Selects an item in the ListBox according to its index.
public Select ( int i ) : void
i int the index to select.
return void

Select() public method

Selects an item in the list according to its string value.
public Select ( string text ) : void
text string The item to select.
return void

SelectItems() public method

Multiple selection of a range of items
public SelectItems ( string items ) : void
items string
return void

SelectedItemsMatch() public method

Test that only the indicated items are selected
public SelectedItemsMatch ( string matches ) : bool
matches string
return bool

this() public method

Allows you to find a ListViewTester by index where the name is not unique.
This was added to support the ability to find controls where their name is not unique. If all of your controls are uniquely named (I recommend this) then you will not need this.
public this ( int index ) : ListViewTester
index int The index of the ListViewTester.
return ListViewTester