Поделиться через


HostTypeAttribute - конструктор (String)

Обновлен: Ноябрь 2007

Инициализирует новый экземпляр класса HostTypeAttribute. Он создается аргументом, задающим тип узла, в котором будет выполняться данный модульный тест.

Пространство имен:  Microsoft.VisualStudio.TestTools.UnitTesting
Сборка:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (в Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Синтаксис

'Декларация
Public Sub New ( _
    hostType As String _
)
'Применение
Dim hostType As String

Dim instance As New HostTypeAttribute(hostType)
public HostTypeAttribute(
    string hostType
)
public:
HostTypeAttribute(
    String^ hostType
)
public function HostTypeAttribute(
    hostType : String
)

Параметры

  • hostType
    Тип: System.String
    Тип узла, в котором будет выполняться данный модульный тест.

Заметки

Стандартный тип узла, входящий в состав Visual Studio 2005 — ASP.NET.

Примеры

[TestMethod()]
[HostType("ASP.NET")]
[UrlToTest("https://localhost:1371/webSite12")]
[AspNetDevelopmentServerHost("d:\\MyWebSite", "/MyWebSiteRoot")]
public void ConstructorTest()
{
   object target = TestProject1.Class1Accessor.CreatePrivate();
   Assert.Inconclusive("TODO: Implement code to verify target");
}

Разрешения

См. также

Ссылки

HostTypeAttribute Класс

HostTypeAttribute - члены

HostTypeAttribute - перегрузка

Microsoft.VisualStudio.TestTools.UnitTesting - пространство имен