Table of Contents

Method GetDisplayNameWithArguments

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

GetDisplayNameWithArguments(MethodInfo, string, object?[]?, Type[]?)

Formulates the extended portion of the display name for a test method. For tests with no arguments, this will return just the base name; for tests with arguments, attempts to format the arguments and appends the argument list to the test name.

public static string GetDisplayNameWithArguments(this MethodInfo method, string baseDisplayName, object?[]? arguments, Type[]? genericTypes)

Parameters

method MethodInfo

The test method

baseDisplayName string

The base part of the display name

arguments object[]

The test method arguments

genericTypes Type[]

The test method's generic types

Returns

string

The full display name for the test method