Table of Contents

Method True

Namespace
Xunit
Assembly
xunit.v3.assert.dll

True(bool)

Verifies that an expression is true.

public static void True(bool condition)

Parameters

condition bool

The condition to be inspected

Exceptions

Thrown when the condition is false

True(bool?)

Verifies that an expression is true.

public static void True(bool? condition)

Parameters

condition bool?

The condition to be inspected

Exceptions

Thrown when the condition is false

True(bool, string?)

Verifies that an expression is true.

public static void True(bool condition, string? userMessage)

Parameters

condition bool

The condition to be inspected

userMessage string

The message to be shown when the condition is false

Exceptions

Thrown when the condition is false

True(bool?, string?)

Verifies that an expression is true.

public static void True(bool? condition, string? userMessage)

Parameters

condition bool?

The condition to be inspected

userMessage string

The message to be shown when the condition is false

Exceptions

Thrown when the condition is false