単体テストが SqlException を予期すること、および必要に応じて、予期されるエラーのエラー番号、重大度、および状態を指定することを指定する属性を表します。
継承階層
System.Object
System.Attribute
Microsoft.VisualStudio.TestTools.UnitTesting.ExpectedExceptionBaseAttribute
Microsoft.Data.Schema.UnitTesting.ExpectedSqlExceptionAttribute
名前空間: Microsoft.Data.Schema.UnitTesting
アセンブリ: Microsoft.Data.Schema.UnitTesting (Microsoft.Data.Schema.UnitTesting.dll 内)
構文
'宣言
Public NotInheritable Class ExpectedSqlExceptionAttribute _
Inherits ExpectedExceptionBaseAttribute
public sealed class ExpectedSqlExceptionAttribute : ExpectedExceptionBaseAttribute
public ref class ExpectedSqlExceptionAttribute sealed : public ExpectedExceptionBaseAttribute
[<Sealed>]
type ExpectedSqlExceptionAttribute =
class
inherit ExpectedExceptionBaseAttribute
end
public final class ExpectedSqlExceptionAttribute extends ExpectedExceptionBaseAttribute
ExpectedSqlExceptionAttribute 型で公開されるメンバーは以下のとおりです。
コンストラクター
名前 | 説明 | |
---|---|---|
![]() |
ExpectedSqlExceptionAttribute() | ExpectedSqlExceptionAttribute クラスの新しいインスタンスを初期化します。 |
![]() |
ExpectedSqlExceptionAttribute(String) | ExpectedSqlExceptionAttribute クラスの新しいインスタンスを初期化します。 |
このページのトップへ
プロパティ
名前 | 説明 | |
---|---|---|
![]() |
MatchFirstError | 予期される重大度、状態、およびエラー番号を SqlException の最初の SqlError と適合させるかどうかを示す値を取得します。 |
![]() |
MessageNumber | 予期されるエラー番号を取得または設定します。 |
![]() |
NoExceptionMessage | (ExpectedExceptionBaseAttribute から継承されます。) |
![]() |
Severity | 予期されるエラーの重大度の値を取得または設定します。 |
![]() |
State | 予期されるエラーのエラー状態を取得または設定します。 |
![]() |
TestContext | (ExpectedExceptionBaseAttribute から継承されます。) |
![]() |
TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 (Attribute から継承されます。) |
このページのトップへ
メソッド
名前 | 説明 | |
---|---|---|
![]() |
Equals | インフラストラクチャ。 このインスタンスが、指定したオブジェクトに等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
![]() |
Finalize | オブジェクトがガベージ コレクションにより収集される前に、そのオブジェクトがリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() |
GetHashCode | 対象のインスタンスのハッシュ コードを返します。 (Attribute から継承されます。) |
![]() |
GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() |
IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。) |
![]() |
Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
![]() |
MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() |
RethrowIfAssertException | (ExpectedExceptionBaseAttribute から継承されます。) |
![]() |
ToString | 現在のオブジェクトを表す文字列を返します。 (Object から継承されます。) |
![]() |
Verify | (ExpectedExceptionBaseAttribute から継承されます。) |
このページのトップへ
明示的インターフェイスの実装
名前 | 説明 | |
---|---|---|
![]() ![]() |
_Attribute.GetIDsOfNames | 名前のセットを対応するディスパッチ識別子のセットにマッピングします。 (Attribute から継承されます。) |
![]() ![]() |
_Attribute.GetTypeInfo | オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。 (Attribute から継承されます。) |
![]() ![]() |
_Attribute.GetTypeInfoCount | オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。 (Attribute から継承されます。) |
![]() ![]() |
_Attribute.Invoke | オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。 (Attribute から継承されます。) |
このページのトップへ
解説
属性の使用方法の詳細については、「属性を使用したメタデータの拡張」を参照してください。
スレッド セーフ
この型のすべてのパブリック static (Visual Basic では Shared) メンバーは、スレッド セーフです。 インスタンス メンバーの場合は、スレッド セーフであるとは限りません。
参照
参照
Microsoft.Data.Schema.UnitTesting 名前空間