Search Results for

    Show / Hide Table of Contents

    Class AssertionResult

    The AssertionResult class represents the result of a single assertion.

    Inheritance
    object
    AssertionResult
    Implements
    IEquatable<AssertionResult>
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: NUnit.Framework.Interfaces
    Assembly: nunit.framework.dll
    Syntax
    public class AssertionResult : IEquatable<AssertionResult>

    Constructors

    View Source

    AssertionResult(AssertionStatus, string, string?)

    Construct an AssertionResult

    Declaration
    public AssertionResult(AssertionStatus status, string message, string? stackTrace)
    Parameters
    Type Name Description
    AssertionStatus status
    string message
    string stackTrace

    Properties

    View Source

    Message

    The message produced by the assertion, or null

    Declaration
    public string Message { get; }
    Property Value
    Type Description
    string
    View Source

    StackTrace

    The stack trace associated with the assertion, or null

    Declaration
    public string? StackTrace { get; }
    Property Value
    Type Description
    string
    View Source

    Status

    The pass/fail status of the assertion

    Declaration
    public AssertionStatus Status { get; }
    Property Value
    Type Description
    AssertionStatus

    Methods

    View Source

    Equals(AssertionResult?)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(AssertionResult? other)
    Parameters
    Type Name Description
    AssertionResult other

    An object to compare with this object.

    Returns
    Type Description
    bool
    View Source

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    View Source

    ToString()

    ToString Override

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IEquatable<T>
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0