Table of Contents

Class TestContext.TestAdapter

Namespace
NUnit.Framework
Assembly
nunit.framework.dll

TestAdapter adapts a Test for consumption by the user test code.

public class TestContext.TestAdapter
Inheritance
TestContext.TestAdapter
Inherited Members

Constructors

TestAdapter(Test)

Construct a TestAdapter for a Test

public TestAdapter(Test test)

Parameters

test Test

The Test to be adapted

Properties

Arguments

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

public object?[] Arguments { get; }

Property Value

object[]

ClassName

The ClassName of the test

public string? ClassName { get; }

Property Value

string

DisplayName

Get the display name of the test.

public string? DisplayName { get; }

Property Value

string

ExpectedResult

The expected result if there is one for the test

public object? ExpectedResult { get; }

Property Value

object

FullName

The FullName of the test

public string FullName { get; }

Property Value

string

ID

Gets the unique Id of a test

public string ID { get; }

Property Value

string

Method

The method representing the test.

public IMethodInfo? Method { get; }

Property Value

IMethodInfo

MethodName

The name of the method representing the test.

public string? MethodName { get; }

Property Value

string

Name

The name of the test, which may or may not be the same as the method name.

public string Name { get; }

Property Value

string

Namespace

Get the Namespace of the test.

public string? Namespace { get; }

Property Value

string

Properties

A shallow copy of the properties of the test.

public TestContext.PropertyBagAdapter Properties { get; }

Property Value

TestContext.PropertyBagAdapter

Type

Gets the underlying Type.

public Type? Type { get; }

Property Value

Type