ExpectedSqlExceptionAttribute クラス
単体テストが SqlException を予期すること、および必要に応じて、予期されるエラーのエラー番号、重大度、および状態を指定することを指定する属性を表します。
名前空間: Microsoft.Data.Tools.Schema.Sql.UnitTesting
アセンブリ: Microsoft.Data.Tools.Schema.Sql.UnitTesting (Microsoft.Data.Tools.Schema.Sql.UnitTesting.dll 内)
継承階層
System.Object
System.Attribute
Microsoft.VisualStudio.TestTools.UnitTesting.ExpectedExceptionBaseAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting.ExpectedSqlExceptionAttribute
構文
[AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = false,
Inherited = true)]
public class ExpectedSqlExceptionAttribute : ExpectedExceptionBaseAttribute
[AttributeUsageAttribute(AttributeTargets::Method, AllowMultiple = false,
Inherited = true)]
public ref class ExpectedSqlExceptionAttribute : ExpectedExceptionBaseAttribute
[<AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = false,
Inherited = true)>]
type ExpectedSqlExceptionAttribute =
class
inherit ExpectedExceptionBaseAttribute
end
<AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple := False,
Inherited := True)>
Public Class ExpectedSqlExceptionAttribute
Inherits ExpectedExceptionBaseAttribute
コンストラクター
名前 | 説明 | |
---|---|---|
![]() |
ExpectedSqlExceptionAttribute() | ExpectedSqlExceptionAttribute クラスの新しいインスタンスを初期化します。 |
![]() |
ExpectedSqlExceptionAttribute(String) | ExpectedSqlExceptionAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
名前 | 説明 | |
---|---|---|
![]() |
MatchFirstError | 予期される重大度、状態、およびエラー番号を SqlError の最初の SqlException と適合させるかどうかを示す値を取得します。 |
![]() |
MessageNumber | 予期されるエラー番号を取得または設定します。 |
![]() |
NoExceptionMessage | (ExpectedExceptionBaseAttribute から継承されました。) |
![]() |
Severity | 予期されるエラーの重大度の値を取得または設定します。 |
![]() |
State | 予期されるエラーのエラー状態を取得または設定します。 |
![]() |
TestContext | (ExpectedExceptionBaseAttribute から継承されました。) |
![]() |
TypeId | (Attribute から継承されました。) |
メソッド
名前 | 説明 | |
---|---|---|
![]() |
Equals(Object) | (Attribute から継承されました。) |
![]() |
Finalize() | (Object から継承されました。) |
![]() |
GetHashCode() | (Attribute から継承されました。) |
![]() |
GetType() | (Object から継承されました。) |
![]() |
IsDefaultAttribute() | (Attribute から継承されました。) |
![]() |
Match(Object) | (Attribute から継承されました。) |
![]() |
MemberwiseClone() | (Object から継承されました。) |
![]() |
RethrowIfAssertException(Exception) | (ExpectedExceptionBaseAttribute から継承されました。) |
![]() |
ToString() | (Object から継承されました。) |
![]() |
Verify(Exception) | (ExpectedExceptionBaseAttribute.Verify(Exception) をオーバーライドする。) |
明示的なインターフェイスの実装
名前 | 説明 | |
---|---|---|
![]() ![]() |
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Attribute から継承されました。) |
![]() ![]() |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Attribute から継承されました。) |
![]() ![]() |
_Attribute.GetTypeInfoCount(UInt32) | (Attribute から継承されました。) |
![]() ![]() |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Attribute から継承されました。) |
スレッド セーフ
すべてのパブリック構造体 (Shared Visual Basic では) メンバーは、スレッド セーフです。 Aインスタンス メンバーの場合は、スレッド セーフであるとは限りません。
参照
ExpectedExceptionAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting 名前空間
トップに戻る