共用方式為


TestCondition.Enabled 屬性

取得或設定值,這個值表示測試條件是否已啟用。

命名空間:  Microsoft.Data.Schema.UnitTesting.Conditions
組件:  Microsoft.Data.Schema.UnitTesting (在 Microsoft.Data.Schema.UnitTesting.dll 中)

語法

'宣告
Public Property Enabled As Boolean
    Get
    Set
public bool Enabled { get; set; }
public:
property bool Enabled {
    bool get ();
    void set (bool value);
}
member Enabled : bool with get, set
function get Enabled () : boolean
function set Enabled (value : boolean)

屬性值

型別:System.Boolean

備註

預設值是 true。 根據預設,所有測試條件加入 DatabaseTestAction 時都是啟用的。 如果啟用條件,會用來評估 DatabaseTestAction 成功與否。 請將這個屬性設為 false,防止測試執行時評估這個測試條件。

.NET Framework 安全性

請參閱

參考

TestCondition 類別

Microsoft.Data.Schema.UnitTesting.Conditions 命名空間