Table of Contents

Class UniqueIDGenerator

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

Generates unique IDs from multiple string inputs. Used to compute the unique IDs that are used inside the test framework.

public sealed class UniqueIDGenerator : IDisposable
Inheritance
UniqueIDGenerator
Implements
Inherited Members

Constructors

UniqueIDGenerator()

Initializes a new instance of the UniqueIDGenerator class.

Methods

Add(string)

Add a string value into the unique ID computation.

Compute()

Compute the unique ID for the given input values. Note that once the unique ID has been computed, no further Add(string) operations will be allowed.

Dispose()
ForAssembly(string, string?)

Computes a unique ID for a test assembly.

ForTest(string, int)

Computes a unique ID for a test.

ForTestCase(string, Type[]?, object?[]?)

Computes a unique ID for a test case.

ForTestClass(string, string?)

Computes a unique ID for a test class.

ForTestCollection(string, string, string?)

Computes a unique ID for a test collection.

ForTestMethod(string?, string?)

Computes a unique ID for a test method.

ForType(Type)

Computes a unique ID for a Type.