次の方法で共有


DynamicDataAttribute クラス

定義

テスト メソッドの動的データを定義する属性。

public ref class DynamicDataAttribute sealed : Attribute, Microsoft::VisualStudio::TestTools::UnitTesting::ITestDataSource
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class DynamicDataAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class DynamicDataAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceUnfoldingCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class DynamicDataAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceUnfoldingCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DynamicDataAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class DynamicDataAttribute : Attribute, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSource, Microsoft.VisualStudio.TestTools.UnitTesting.ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DynamicDataAttribute = class
    inherit Attribute
    interface ITestDataSource
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DynamicDataAttribute = class
    inherit Attribute
    interface ITestDataSource
    interface ITestDataSourceUnfoldingCapability
    interface ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type DynamicDataAttribute = class
    inherit Attribute
    interface ITestDataSource
    interface ITestDataSourceUnfoldingCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DynamicDataAttribute = class
    inherit Attribute
    interface ITestDataSource
    interface ITestDataSourceIgnoreCapability
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
type DynamicDataAttribute = class
    inherit Attribute
    interface ITestDataSource
    interface ITestDataSourceIgnoreCapability
Public NotInheritable Class DynamicDataAttribute
Inherits Attribute
Implements ITestDataSource
Public NotInheritable Class DynamicDataAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceIgnoreCapability, ITestDataSourceUnfoldingCapability
Public NotInheritable Class DynamicDataAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceUnfoldingCapability
Public NotInheritable Class DynamicDataAttribute
Inherits Attribute
Implements ITestDataSource, ITestDataSourceIgnoreCapability
継承
DynamicDataAttribute
属性
実装

コンストラクター

名前 説明
DynamicDataAttribute(String, DynamicDataSourceType)

DynamicDataAttribute クラスの新しいインスタンスを初期化します。

DynamicDataAttribute(String, Object[])

DynamicDataAttribute クラスの新しいインスタンスを初期化します。

DynamicDataAttribute(String, Type, DynamicDataSourceType)

テスト データがテスト メソッドのクラスとは異なるクラスに存在する場合に、 DynamicDataAttribute クラスの新しいインスタンスを初期化します。

DynamicDataAttribute(String, Type, Object[])

テスト データがテスト メソッドのクラスとは異なるクラスに存在する場合に、 DynamicDataAttribute クラスの新しいインスタンスを初期化します。

DynamicDataAttribute(String, Type)

テスト データがテスト メソッドのクラスとは異なるクラスに存在する場合に、 DynamicDataAttribute クラスの新しいインスタンスを初期化します。

DynamicDataAttribute(String)

DynamicDataAttribute クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
DynamicDataDisplayName

テスト結果の表示名をカスタマイズするために使用するメソッドの名前を取得または設定します。

DynamicDataDisplayNameDeclaringType

テスト結果の表示名をカスタマイズするために使用する宣言型を取得または設定します。

IgnoreMessage

この動的データ ソースを無視する理由を取得または設定します。 プロパティを null 以外の値に設定すると、動的データ ソースは無視されます。

UnfoldingStrategy

パラメーター化されたテストを展開するための戦略を取得します。

メソッド

名前 説明
GetData(MethodInfo)

カスタム テスト データ ソースからテスト データを取得します。

GetDisplayName(MethodInfo, Object[])

TestResults で表示するテスト データ行に対応する表示名を取得します。

適用対象