次の方法で共有


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

コンストラクター

名前 説明
System_CAPS_pubmethod ExpectedSqlExceptionAttribute()

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

System_CAPS_pubmethod ExpectedSqlExceptionAttribute(String)

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

プロパティ

名前 説明
System_CAPS_pubproperty MatchFirstError

予期される重大度、状態、およびエラー番号を SqlError の最初の SqlException と適合させるかどうかを示す値を取得します。

System_CAPS_pubproperty MessageNumber

予期されるエラー番号を取得または設定します。

System_CAPS_protproperty NoExceptionMessage

(ExpectedExceptionBaseAttribute から継承されました。)

System_CAPS_pubproperty Severity

予期されるエラーの重大度の値を取得または設定します。

System_CAPS_pubproperty State

予期されるエラーのエラー状態を取得または設定します。

System_CAPS_protproperty TestContext

(ExpectedExceptionBaseAttribute から継承されました。)

System_CAPS_pubproperty TypeId

(Attribute から継承されました。)

メソッド

名前 説明
System_CAPS_pubmethod Equals(Object)

(Attribute から継承されました。)

System_CAPS_protmethod Finalize()

(Object から継承されました。)

System_CAPS_pubmethod GetHashCode()

(Attribute から継承されました。)

System_CAPS_pubmethod GetType()

(Object から継承されました。)

System_CAPS_pubmethod IsDefaultAttribute()

(Attribute から継承されました。)

System_CAPS_pubmethod Match(Object)

(Attribute から継承されました。)

System_CAPS_protmethod MemberwiseClone()

(Object から継承されました。)

System_CAPS_protmethod RethrowIfAssertException(Exception)

(ExpectedExceptionBaseAttribute から継承されました。)

System_CAPS_pubmethod ToString()

(Object から継承されました。)

System_CAPS_protmethod Verify(Exception)

(ExpectedExceptionBaseAttribute.Verify(Exception) をオーバーライドする。)

明示的なインターフェイスの実装

名前 説明
System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

(Attribute から継承されました。)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

(Attribute から継承されました。)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfoCount(UInt32)

(Attribute から継承されました。)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

(Attribute から継承されました。)

スレッド セーフ

すべてのパブリック構造体 (Shared Visual Basic では) メンバーは、スレッド セーフです。 Aインスタンス メンバーの場合は、スレッド セーフであるとは限りません。

参照

ExpectedExceptionAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting 名前空間

トップに戻る