Skip to content

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

License

Notifications You must be signed in to change notification settings

VerifyTests/Verify.ParametersHashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify.ParametersHashing

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

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.

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 3

  •  
  •  
  •  

Languages