DatabaseTestAction Class

Represents a set of Transact-SQL batch statements and test conditions to validate whether the statement executed correctly.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.Data.Schema.UnitTesting.DatabaseTestAction

Namespace:  Microsoft.Data.Schema.UnitTesting
Assembly:  Microsoft.Data.Schema.UnitTesting (in Microsoft.Data.Schema.UnitTesting.dll)

Syntax

'Declaration
Public NotInheritable Class DatabaseTestAction _
    Inherits Component
public sealed class DatabaseTestAction : Component
public ref class DatabaseTestAction sealed : public Component
[<Sealed>]
type DatabaseTestAction =  
    class
        inherit Component
    end
public final class DatabaseTestAction extends Component

The DatabaseTestAction type exposes the following members.

Constructors

  Name Description
Public method DatabaseTestAction Initializes a new instance of the DatabaseTestAction class.

Top

Properties

  Name Description
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property Conditions Gets the collection of test conditions that are associated with the set of Transact-SQL statements.
Public property Container Gets the IContainer that contains the Component. (Inherited from Component.)
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Protected property Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property SqlScript Gets or sets a set of Transact-SQL database script statements.

Top

Methods

  Name Description
Public method CreateObjRef Security Critical. Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose() Releases all resources used by the Component. (Inherited from Component.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Security Critical. Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Security Critical. Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

Top

Events

  Name Description
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

Top

Remarks

This class represents set of Transact-SQL batch statements and a Conditions object, which is a collection of conditions that are used to evaluate the result sets that are generated by executing the batch statements.

In the simplest case, the DatabaseTestAction is an actual Transact-SQL test. Instances of the DatabaseTestAction are also included in the generated code so that you can modify the state of the database before or after each test execution. Or, you can use it as a verification mechanism.

The DatabaseTestAction is a Component and is generated as a local variable inside the InitializeComponent method at design time. It is then assigned to a DatabaseTestActions property.

Thread Safety

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

See Also

Reference

Microsoft.Data.Schema.UnitTesting Namespace

Conditions

DatabaseTestAction