단위 테스트에서 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
생성자
| 이름 | 설명 | |
|---|---|---|
![]() |
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) |
명시적 인터페이스 구현
스레드로부터의 안전성
이 형식의 모든 public static (Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.
참고 항목
ExpectedExceptionAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting 네임스페이스
맨 위로 이동
.jpeg)
.jpeg)
.jpeg)
.jpeg)
.jpeg)
.jpeg)