Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Initializes a new instance of the HostTypeAttribute class. This is instantiated by using an argument that specifies the type of host on which this unit test will run.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Sub New ( _
hostType As String _
)
public HostTypeAttribute(
string hostType
)
public:
HostTypeAttribute(
String^ hostType
)
new :
hostType:string -> HostTypeAttribute
public function HostTypeAttribute(
hostType : String
)
Parameters
hostType
Type: StringThe type of host on which this unit test will run.
Remarks
The standard type of host that is included with Visual Studio 2005 is ASP.NET.
Examples
[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");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.