C# Класс NUnit.Extensions.Asp.AspTester.AspControlTester

Base class for testing all ASP.NET server controls. Extend this class if you're creating a tester for a custom control.
Наследование: ControlTester
Показать файл Открыть проект

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

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

AspControlTester ( 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.

Защищенные методы

Метод Описание
GenerateAnonymousId ( int controlNumber ) : string

Creates an ID for a control that doesn't have one provided in the .aspx page. The tester using this method must algorithmically determine what number ASP.NET provided to the control. In other words, control number "3" turns into an ID of "ctl03" in ASP.NET 2.0 and "_ctl3" in ASP.NET 1.x.

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

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

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 AspControlTester ( string aspId ) : System
aspId string The ID of the control to test (look in the /// page's ASP.NET source code for the ID).
Результат System

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

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

GenerateAnonymousId() защищенный Метод

Creates an ID for a control that doesn't have one provided in the .aspx page. The tester using this method must algorithmically determine what number ASP.NET provided to the control. In other words, control number "3" turns into an ID of "ctl03" in ASP.NET 2.0 and "_ctl3" in ASP.NET 1.x.
protected GenerateAnonymousId ( int controlNumber ) : string
controlNumber int The number ASP.NET created for the control.
Результат string