Classe ExpectedSqlExceptionAttribute
Representa um atributo que especifica que um teste de unidade está esperando um SqlException e, opcionalmente, especifica o número do erro, a severidade e o estado do erro esperado.
Namespace: Microsoft.Data.Tools.Schema.Sql.UnitTesting
Assembly: Microsoft.Data.Tools.Schema.Sql.UnitTesting (em Microsoft.Data.Tools.Schema.Sql.UnitTesting.dll)
Hierarquia de herança
System.Object
System.Attribute
Microsoft.VisualStudio.TestTools.UnitTesting.ExpectedExceptionBaseAttribute
Microsoft.Data.Tools.Schema.Sql.UnitTesting.ExpectedSqlExceptionAttribute
Sintaxe
[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
Construtores
Nome | Descrição | |
---|---|---|
ExpectedSqlExceptionAttribute() | Inicializa uma nova instância da classe ExpectedSqlExceptionAttribute. |
|
ExpectedSqlExceptionAttribute(String) | Inicializa uma nova instância da classe ExpectedSqlExceptionAttribute. |
Propriedades
Nome | Descrição | |
---|---|---|
MatchFirstError | Obtém um valor que indica se a severidade, o estado e o número de erro esperados coincidem com o primeiro SqlError no SqlException. |
|
MessageNumber | Obtém ou define o número de erro esperado. |
|
NoExceptionMessage | (herdado de ExpectedExceptionBaseAttribute.) |
|
Severity | Obtém ou define o valor de severidade esperado do erro. |
|
State | Obtém ou define o estado de erro esperado do erro. |
|
TestContext | (herdado de ExpectedExceptionBaseAttribute.) |
|
TypeId | (herdado de Attribute.) |
Métodos
Nome | Descrição | |
---|---|---|
Equals(Object) | (herdado de Attribute.) |
|
Finalize() | (herdado de Object.) |
|
GetHashCode() | (herdado de Attribute.) |
|
GetType() | (herdado de Object.) |
|
IsDefaultAttribute() | (herdado de Attribute.) |
|
Match(Object) | (herdado de Attribute.) |
|
MemberwiseClone() | (herdado de Object.) |
|
RethrowIfAssertException(Exception) | (herdado de ExpectedExceptionBaseAttribute.) |
|
ToString() | (herdado de Object.) |
|
Verify(Exception) | (Substitui ExpectedExceptionBaseAttribute.Verify(Exception).) |
Implementações explícitas da interface
Nome | Descrição | |
---|---|---|
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (herdado de Attribute.) |
|
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (herdado de Attribute.) |
|
_Attribute.GetTypeInfoCount(UInt32) | (herdado de Attribute.) |
|
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (herdado de Attribute.) |
Acesso thread-safe
Qualquer estático público (Compartilhado no Visual Basic) membros desde tipo são thread safe. Não há garantia de que qualquer membro de instância seja thread-safe.
Consulte também
ExpectedExceptionAttribute
Namespace Microsoft.Data.Tools.Schema.Sql.UnitTesting
Retornar ao topo