Search Results for

    Show / Hide Table of Contents

    Class TestOutput

    The TestOutput class holds a unit of output from a test to a specific output stream

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

    Constructors

    View Source

    TestOutput(string, string, string?, string?)

    Construct with text, output destination type and the name of the test that produced the output.

    Declaration
    public TestOutput(string text, string stream, string? testId, string? testName)
    Parameters
    Type Name Description
    string text

    Text to be output

    string stream

    Name of the stream or channel to which the text should be written

    string testId

    Id of the test that produced the output

    string testName

    FullName of test that produced the output

    Properties

    View Source

    Stream

    Get the output type

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

    TestId

    Get the id of the test that created the output

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

    TestName

    Get the name of the test that created the output

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

    Text

    Get the text

    Declaration
    public string Text { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    ToString()

    Return string representation of the object for debugging

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

    ToXml()

    Convert the TestOutput object to an XML string

    Declaration
    public string ToXml()
    Returns
    Type Description
    string
    • 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