Table of Contents

Interface IAssemblyMetadata

Namespace
Xunit.Sdk

Represents metadata about a test assembly.

public interface IAssemblyMetadata
Extension Methods

Properties

AssemblyName

Gets the assembly name. May return a simple assembly name (i.e., "mscorlib"), or may return a fully qualified name (i.e., "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089").

string AssemblyName { get; }

Property Value

string

AssemblyPath

Gets the on-disk location of the assembly under test.

string AssemblyPath { get; }

Property Value

string

ConfigFilePath

Gets the full path of the configuration file name, if one is present. May be null if there is no configuration file.

string? ConfigFilePath { get; }

Property Value

string

Traits

Gets the trait values associated with this test assembly. If there are none, or the framework does not support traits, this should return an empty dictionary (not null).

IReadOnlyDictionary<string, IReadOnlyCollection<string>> Traits { get; }

Property Value

IReadOnlyDictionary<string, IReadOnlyCollection<string>>

UniqueID

Gets the unique ID for this test assembly.

string UniqueID { get; }

Property Value

string

Remarks

The unique identifier for a test assembly should be able to discriminate among test assemblies with their associated configuration file (so the same assembly with two different configuration files should have two different unique IDs). This identifier should remain stable until such time as the developer changes some fundamental part of the identity. Recompilation of the test assembly is reasonable as a stability changing event.