Search Results for

    Show / Hide Table of Contents

    Class TestMessage

    The TestMessage class holds a message sent by a test to all listeners

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

    Constructors

    View Source

    TestMessage(string, string, string?)

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

    Declaration
    public TestMessage(string destination, string text, string? testId)
    Parameters
    Type Name Description
    string destination

    Destination of the message

    string text

    Text to be sent

    string testId

    ID of the test that produced the message

    Properties

    View Source

    Destination

    The Destination of the message.

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

    Message

    The message to send to listeners

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

    TestId

    The ID of the test that sent the message

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

    Methods

    View Source

    ToString()

    Converts TestMessage object to string

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

    ToXml()

    Returns the XML representation of the TestMessage object.

    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