Table of Contents

Class TestNameGenerator

Namespace
NUnit.Framework.Internal
Assembly
nunit.framework.dll

TestNameGenerator is able to create test names according to a coded pattern.

public class TestNameGenerator
Inheritance
TestNameGenerator
Inherited Members

Constructors

TestNameGenerator()

Construct a TestNameGenerator

public TestNameGenerator()

TestNameGenerator(string)

Construct a TestNameGenerator

public TestNameGenerator(string pattern)

Parameters

pattern string

The pattern used by this generator.

Fields

DefaultTestNamePattern

Default pattern used to generate names

public static string DefaultTestNamePattern

Field Value

string

Methods

GetDisplayName(TestMethod)

Get the display name for a TestMethod and its arguments

public string GetDisplayName(TestMethod testMethod)

Parameters

testMethod TestMethod

A TestMethod

Returns

string

The display name

GetDisplayName(TestMethod, object?[]?)

Get the display name for a TestMethod and its arguments

public string GetDisplayName(TestMethod testMethod, object?[]? args)

Parameters

testMethod TestMethod

A TestMethod

args object[]

Arguments to be used

Returns

string

The display name