DatabaseTestActions 类

表示数据库单元测试。

继承层次结构

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

命名空间:  Microsoft.Data.Schema.UnitTesting
程序集:  Microsoft.Data.Schema.UnitTesting(在 Microsoft.Data.Schema.UnitTesting.dll 中)

语法

声明
Public NotInheritable Class DatabaseTestActions _
    Inherits Component
public sealed class DatabaseTestActions : Component
public ref class DatabaseTestActions sealed : public Component
[<Sealed>]
type DatabaseTestActions =  
    class
        inherit Component
    end
public final class DatabaseTestActions extends Component

DatabaseTestActions 类型公开以下成员。

构造函数

  名称 说明
公共方法 DatabaseTestActions 初始化 DatabaseTestActions 类的新实例。

页首

属性

  名称 说明
受保护的属性 CanRaiseEvents 获取一个指示组件是否可以引发事件的值。 (继承自 Component。)
公共属性 Container 获取 IContainer,它包含 Component。 (继承自 Component。)
受保护的属性 DesignMode 获取一个值,用以指示 Component 当前是否处于设计模式。 (继承自 Component。)
受保护的属性 Events 获取附加到此 Component 的事件处理程序的列表。 (继承自 Component。)
公共属性 PosttestAction 获取或设置在测试执行之后要执行的 Transact-SQL 语句和测试条件。
公共属性 PretestAction 获取或设置在测试前要执行的 Transact-SQL 语句和测试条件。
公共属性 Site 获取或设置 ComponentISite。 (继承自 Component。)
公共属性 TestAction 获取或设置在测试过程中要执行的 Transact-SQL 语句和测试条件。

页首

方法

  名称 说明
公共方法 CreateObjRef 安全关键。创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。 (继承自 MarshalByRefObject。)
公共方法 Dispose() 释放由 Component 使用的所有资源。 (继承自 Component。)
受保护的方法 Dispose(Boolean) 释放 Component 占用的非托管资源,也可以选择释放托管资源。 (继承自 Component。)
公共方法 Equals 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
受保护的方法 Finalize 在通过垃圾回收将 Component 回收之前,释放非托管资源并执行其他清理操作。 (继承自 Component。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetLifetimeService 安全关键。检索控制此实例的生存期策略的当前生存期服务对象。 (继承自 MarshalByRefObject。)
受保护的方法 GetService 返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。 (继承自 Component。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 InitializeLifetimeService 安全关键。获取控制此实例的生存期策略的生存期服务对象。 (继承自 MarshalByRefObject。)
受保护的方法 MemberwiseClone() 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 MemberwiseClone(Boolean) 创建当前 MarshalByRefObject 对象的浅表副本。 (继承自 MarshalByRefObject。)
公共方法 ToString 返回包含 Component 的名称的 String(如果有)。不应重写此方法。 (继承自 Component。)

页首

事件

  名称 说明
公共事件 Disposed 当通过调用 Dispose 方法释放组件时发生。 (继承自 Component。)

页首

备注

此类表示使用数据库单元测试设计器创建的数据库单元测试。 在某个类执行测试时,为单元测试生成的代码将针对此类的属性进行操作。

数据库测试操作作为生成的代码中的私有成员变量进行存储。 在单元测试方法的开头将引用此成员变量,并在测试执行过程中使用该变量的属性。 使用 TestMethodAttribute 指定单元测试方法。

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Data.Schema.UnitTesting 命名空间

TestMethodAttribute