ExpectedSqlExceptionAttribute Class

 

Represents an attribute that specifies that a unit test is expecting a SqlException, and optionally specify the error number, severity, and state of the expected error.

Namespace:   Microsoft.Data.Tools.Schema.Sql.UnitTesting
Assembly:  Microsoft.Data.Tools.Schema.Sql.UnitTesting (in 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

NameDescription
System_CAPS_pubmethodExpectedSqlExceptionAttribute()

Initializes a new instance of the ExpectedSqlExceptionAttribute class.

System_CAPS_pubmethodExpectedSqlExceptionAttribute(String)

Initializes a new instance of the ExpectedSqlExceptionAttribute class.

NameDescription
System_CAPS_pubpropertyMatchFirstError

Gets a value that indicates whether the expected severity, state, and error number are to be matched against the first SqlError in the SqlException.

System_CAPS_pubpropertyMessageNumber

Gets or sets the expected error number.

System_CAPS_protpropertyNoExceptionMessage
System_CAPS_pubpropertySeverity

Gets or sets the expected severity value of the error.

System_CAPS_pubpropertyState

Gets or sets the expected error state of the error.

System_CAPS_protpropertyTestContext
System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: