Verify.ParametersHashing

April 9, 2026 ยท View on GitHub

Discussions Build status NuGet Status

Extends Verify to allow hashing of parameters to mitigate long file names.

See Milestones for release notes.

Sponsors

Entity Framework Extensions

Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.

Entity Framework Extensions

Developed using JetBrains IDEs

JetBrains logo.

NuGet

Usage

Parameters can be hashed as an alternative to being stringified. This is useful when the parameters are large and could potentially generate file names that exceed allowances of the OS.

XxHash64 is used to perform the hash.

Hashing parameters is achieved by using HashParameters():

Instance

[TestCase("Value1")]
[TestCase("Value2")]
public Task HashParametersUsage(string arg)
{
    var settings = new VerifySettings();
    settings.HashParameters();
    return Verify(arg, settings);
}

snippet source | anchor

Fluent

[TestCase("Value1")]
[TestCase("Value2")]
public Task HashParametersUsageFluent(string arg) =>
    Verify(arg)
        .HashParameters();

snippet source | anchor

Icon

Hash designed by Hide Maru from The Noun Project.