<PackageReference Include="NUnit" Version="3.8.1" />

AssertionResult

public class AssertionResult
The AssertionResult class represents the result of a single assertion.
using System; namespace NUnit.Framework.Interfaces { public class AssertionResult { public AssertionStatus Status { get; set; } public string Message { get; set; } public string StackTrace { get; set; } public AssertionResult(AssertionStatus status, string message, string stackTrace) { Status = status; Message = message; StackTrace = stackTrace; } public override string ToString() { return $"""{Status}""{Message}" + Environment.NewLine + StackTrace; } public override int GetHashCode() { return ToString().GetHashCode(); } public override bool Equals(object obj) { AssertionResult assertionResult = obj as AssertionResult; if (assertionResult != null && Status == assertionResult.Status && Message == assertionResult.Message) return StackTrace == assertionResult.StackTrace; return false; } } }