Export (0) Print
Expand All

HostTypeAttribute Constructor

Initializes a new instance of the HostTypeAttribute class. This is instantiated with an argument that specifies the type of host that this unit test will run in.

Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in microsoft.visualstudio.qualitytools.unittestframework.dll)

public HostTypeAttribute (
	string hostType
)
public HostTypeAttribute (
	String hostType
)
public function HostTypeAttribute (
	hostType : String
)

Parameters

hostType

The type of host that this unit test will run in.

The standard type of host that is included with Visual Studio 2005 is ASP.NET.

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

Community Additions

ADD
Show:
© 2015 Microsoft