다음을 통해 공유


ExpectedSqlExceptionAttribute 클래스

 

단위 테스트에서 SqlException을 예상하도록 지정하고 경우에 따라 예상된 오류의 오류 번호, 심각도 및 상태를 지정하는 특성을 나타냅니다.

네임스페이스:   Microsoft.Data.Tools.Schema.Sql.UnitTesting
어셈블리:  Microsoft.Data.Tools.Schema.Sql.UnitTesting.dll의 Microsoft.Data.Tools.Schema.Sql.UnitTesting

상속 계층 구조

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에서 상속됨.)

스레드로부터의 안전성

이 형식의 모든 public static (Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

참고 항목

ExpectedExceptionAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting 네임스페이스

맨 위로 이동