C# Класс 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.
Наследование: NUnit.Extensions.Forms.ControlTester
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
FindItemByString ( string text ) : int
ItemFound ( int index ) : bool

Описание методов

ClearSelected() публичный Метод

Clears the selections from the list box.
public ClearSelected ( ) : void
Результат void

ListViewTester() публичный Метод

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.
Результат System.Collections

ListViewTester() публичный Метод

Creates a ControlTester from the control name.
This is the best constructor.
public ListViewTester ( string name ) : System.Collections
name string The Control name.
Результат System.Collections

ListViewTester() публичный Метод

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.
Результат System.Collections

ListViewTester() публичный Метод

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..
Результат System.Collections

Select() публичный Метод

Selects an item in the ListBox according to its index.
public Select ( int i ) : void
i int the index to select.
Результат void

Select() публичный Метод

Selects an item in the list according to its string value.
public Select ( string text ) : void
text string The item to select.
Результат void

SelectItems() публичный Метод

Multiple selection of a range of items
public SelectItems ( string items ) : void
items string
Результат void

SelectedItemsMatch() публичный Метод

Test that only the indicated items are selected
public SelectedItemsMatch ( string matches ) : bool
matches string
Результат bool

this() публичный Метод

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.
Результат ListViewTester