Search Results for

    Show / Hide Table of Contents

    Interface ITest

    Common interface supported by all representations of a test. Only includes informational fields. The Run method is specifically excluded to allow for data-only representations of a test.

    Inherited Members
    IXmlNodeBuilder.ToXml(bool)
    IXmlNodeBuilder.AddToXml(TNode, bool)
    Namespace: NUnit.Framework.Interfaces
    Assembly: nunit.framework.dll
    Syntax
    public interface ITest : IXmlNodeBuilder

    Properties

    View Source

    Arguments

    The arguments to use in creating the test or empty array if none are required.

    Declaration
    object?[] Arguments { get; }
    Property Value
    Type Description
    object[]
    View Source

    ClassName

    Gets the name of the class containing this test. Returns null if the test is not associated with a class.

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

    Fixture

    Gets a fixture object for running this test.

    Declaration
    object? Fixture { get; }
    Property Value
    Type Description
    object
    View Source

    FullName

    Gets the fully qualified name of the test

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

    HasChildren

    Gets a bool indicating whether the current test has any descendant tests.

    Declaration
    bool HasChildren { get; }
    Property Value
    Type Description
    bool
    View Source

    Id

    Gets the id of the test

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

    IsSuite

    Returns true if this is a test suite

    Declaration
    bool IsSuite { get; }
    Property Value
    Type Description
    bool
    View Source

    Method

    Gets the method which declares the test, or null if no method is associated with this test.

    Declaration
    IMethodInfo? Method { get; }
    Property Value
    Type Description
    IMethodInfo
    View Source

    MethodName

    Gets the name of the method implementing this test. Returns null if the test is not implemented as a method.

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

    Name

    Gets the name of the test

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

    Parent

    Gets the parent test, if any.

    Declaration
    ITest? Parent { get; }
    Property Value
    Type Description
    ITest

    The parent test or null if none exists.

    View Source

    Properties

    Gets the properties of the test

    Declaration
    IPropertyBag Properties { get; }
    Property Value
    Type Description
    IPropertyBag
    View Source

    RunState

    Gets the RunState of the test, indicating whether it can be run.

    Declaration
    RunState RunState { get; }
    Property Value
    Type Description
    RunState
    View Source

    TestCaseCount

    Count of the test cases ( 1 if this is a test case )

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

    TestType

    Gets the type of the test

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

    Tests

    Gets this test's child tests

    Declaration
    IList<ITest> Tests { get; }
    Property Value
    Type Description
    IList<ITest>

    A list of child tests

    View Source

    TypeInfo

    Gets the Type of the test fixture, if applicable, or null if no fixture type is associated with this test.

    Declaration
    ITypeInfo? TypeInfo { get; }
    Property Value
    Type Description
    ITypeInfo
    • 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