Search Results for

    Show / Hide Table of Contents

    Class TestContext.ResultAdapter

    ResultAdapter adapts a TestResult for consumption by the user test code.

    Inheritance
    object
    TestContext.ResultAdapter
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework
    Assembly: nunit.framework.dll
    Syntax
    public class TestContext.ResultAdapter

    Constructors

    View Source

    ResultAdapter(TestResult)

    Construct a ResultAdapter for a TestResult

    Declaration
    public ResultAdapter(TestResult result)
    Parameters
    Type Name Description
    TestResult result

    The TestResult to be adapted

    Properties

    View Source

    Assertions

    Gets a list of the assertion results generated up to this point in the test.

    Declaration
    public IEnumerable<AssertionResult> Assertions { get; }
    Property Value
    Type Description
    IEnumerable<AssertionResult>
    View Source

    FailCount

    Gets the number of test cases that failed when running the test and all its children.

    Declaration
    public int FailCount { get; }
    Property Value
    Type Description
    int
    View Source

    InconclusiveCount

    Gets the number of test cases that were inconclusive when running the test and all its children.

    Declaration
    public int InconclusiveCount { get; }
    Property Value
    Type Description
    int
    View Source

    Message

    Gets the message associated with a test failure or with not running the test

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

    Outcome

    Gets a ResultState representing the outcome of the test up to this point in its execution.

    Declaration
    public ResultState Outcome { get; }
    Property Value
    Type Description
    ResultState
    View Source

    PassCount

    Gets the number of test cases that passed when running the test and all its children.

    Declaration
    public int PassCount { get; }
    Property Value
    Type Description
    int
    View Source

    SkipCount

    Gets the number of test cases that were skipped when running the test and all its children.

    Declaration
    public int SkipCount { get; }
    Property Value
    Type Description
    int
    View Source

    StackTrace

    Gets any stack trace associated with an error or failure.

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

    WarningCount

    Gets the number of test cases that had warnings when running the test and all its children.

    Declaration
    public int WarningCount { get; }
    Property Value
    Type Description
    int
    • 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