HostTypeAttribute コンストラクター (String)

HostTypeAttribute クラスの新しいインスタンスを初期化します。 これは、この単体テストを実行するホストの種類を指定する引数を使用してインスタンス化されます。

名前空間:  Microsoft.VisualStudio.TestTools.UnitTesting
アセンブリ:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 内)

構文

'宣言
Public Sub New ( _
    hostType As String _
)
public HostTypeAttribute(
    string hostType
)
public:
HostTypeAttribute(
    String^ hostType
)
new : 
        hostType:string -> HostTypeAttribute
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");
}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

HostTypeAttribute クラス

HostTypeAttribute オーバーロード

Microsoft.VisualStudio.TestTools.UnitTesting 名前空間