Class AssertionResult
- Namespace
- NUnit.Framework.Interfaces
- Assembly
- nunit.framework.dll
The AssertionResult class represents the result of a single assertion.
public class AssertionResult : IEquatable<AssertionResult>
- Inheritance
-
AssertionResult
- Implements
- Inherited Members
Constructors
AssertionResult(AssertionStatus, string, string?)
Construct an AssertionResult
public AssertionResult(AssertionStatus status, string message, string? stackTrace)
Parameters
status
AssertionStatusmessage
stringstackTrace
string
Properties
Message
The message produced by the assertion, or null
public string Message { get; }
Property Value
StackTrace
The stack trace associated with the assertion, or null
public string? StackTrace { get; }
Property Value
Status
The pass/fail status of the assertion
public AssertionStatus Status { get; }
Property Value
Methods
Equals(AssertionResult?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(AssertionResult? other)
Parameters
other
AssertionResultAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
ToString()
ToString Override
public override string ToString()