共用方式為


Assert.True 方法

定義

多載

True(Boolean, String)

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

True(Boolean)

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

True(Boolean, String, Object[])

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

True(Boolean, String)

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

public static void True(bool condition, string message);
static member True : bool * string -> unit

參數

condition
Boolean

評估的條件

message
String

條件為 false 時要顯示的訊息

適用於

True(Boolean)

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

public static void True(bool condition);
static member True : bool -> unit

參數

condition
Boolean

評估的條件

適用於

True(Boolean, String, Object[])

判斷提示條件為 true。 如果條件為 false,方法會 AssertionException 擲回 。

public static void True(bool condition, string message, params object[] args);
static member True : bool * string * obj[] -> unit

參數

condition
Boolean

評估的條件

message
String

條件為 false 時要顯示的訊息

args
Object[]

用於格式化訊息的引數

適用於