DatabaseTestService.Execute Method
Executes the supplied DatabaseTestAction and evaluates the results of the execution using each TestCondition contained in the DatabaseTestAction's Conditions collection.
Namespace: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting
Assembly: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting (in Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.dll)
Syntax
'Declaration
Public Overridable Function Execute ( _
scriptExecutionContext As ConnectionContext, _
privilegedExecutionContext As ConnectionContext, _
action As DatabaseTestAction, _
ParamArray sqlParameters As DbParameter() _
) As ExecutionResult()
'Usage
Dim instance As DatabaseTestService
Dim scriptExecutionContext As ConnectionContext
Dim privilegedExecutionContext As ConnectionContext
Dim action As DatabaseTestAction
Dim sqlParameters As DbParameter()
Dim returnValue As ExecutionResult()
returnValue = instance.Execute(scriptExecutionContext, _
privilegedExecutionContext, action, _
sqlParameters)
public virtual ExecutionResult[] Execute(
ConnectionContext scriptExecutionContext,
ConnectionContext privilegedExecutionContext,
DatabaseTestAction action,
params DbParameter[] sqlParameters
)
public:
virtual array<ExecutionResult^>^ Execute(
ConnectionContext^ scriptExecutionContext,
ConnectionContext^ privilegedExecutionContext,
DatabaseTestAction^ action,
... array<DbParameter^>^ sqlParameters
)
public function Execute(
scriptExecutionContext : ConnectionContext,
privilegedExecutionContext : ConnectionContext,
action : DatabaseTestAction,
... sqlParameters : DbParameter[]
) : ExecutionResult[]
Parameters
- scriptExecutionContext
Type: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.ConnectionContext
The context to use when executing the T-SQL in the SqlScript.
- privilegedExecutionContext
Type: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.ConnectionContext
The context to use when validating the test conditions.
- action
Type: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.DatabaseTestAction
The DatabaseTestAction to execute.
- sqlParameters
Type: array<System.Data.Common.DbParameter[]
Zero or more DbParameters that will be provided in the executed T-SQL.
Return Value
Type: array<Microsoft.VisualStudio.TeamSystem.Data.UnitTesting.ExecutionResult[]
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TeamSystem.Data.UnitTesting Namespace