Class BooleanAsserts
- Namespace
- Asserts
- Assembly
- xunit.v3.assert.dll
public class BooleanAsserts
- Inheritance
-
BooleanAsserts
- Inherited Members
Methods
False(bool)
Verifies that the condition is false.
public static void False(bool condition)
Parameters
conditionboolThe condition to be tested
Examples
[Fact]
public void TestConditionIsFalse()
{
// Arrange
bool condition = (5 > 10); // This condition is false.
// Act & Assert
Assert.False(condition); // Verifies the condition is false.
}
Contribution guide.
Exceptions
- FalseException
Thrown if the condition is not false
False(bool, string?)
Verifies that the condition is false.
public static void False(bool condition, string? userMessage)
Parameters
conditionboolThe condition to be tested
userMessagestringThe message to show when the condition is not false
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- FalseException
Thrown if the condition is not false
False(bool?)
Verifies that the condition is false.
public static void False(bool? condition)
Parameters
conditionbool?The condition to be tested
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- FalseException
Thrown if the condition is not false
False(bool?, string?)
Verifies that the condition is false.
public static void False(bool? condition, string? userMessage)
Parameters
conditionbool?The condition to be tested
userMessagestringThe message to show when the condition is not false
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- FalseException
Thrown if the condition is not false
True(bool)
Verifies that an expression is true.
public static void True(bool condition)
Parameters
conditionboolThe condition to be inspected
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- TrueException
Thrown when the condition is false
True(bool, string?)
Verifies that an expression is true.
public static void True(bool condition, string? userMessage)
Parameters
conditionboolThe condition to be inspected
userMessagestringThe message to be shown when the condition is false
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- TrueException
Thrown when the condition is false
True(bool?)
Verifies that an expression is true.
public static void True(bool? condition)
Parameters
conditionbool?The condition to be inspected
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- TrueException
Thrown when the condition is false
True(bool?, string?)
Verifies that an expression is true.
public static void True(bool? condition, string? userMessage)
Parameters
conditionbool?The condition to be inspected
userMessagestringThe message to be shown when the condition is false
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- TrueException
Thrown when the condition is false