VerifyTests / Verify

Verify is a snapshot testing tool that simplifies the assertion of complex data models and documents.
MIT License
2.51k stars 141 forks source link

Named Guid are not scrubbed with instance settings #1246

Closed davla closed 3 months ago

davla commented 3 months ago

Adding a named Guid via instance settings does not replace the Guid, unless the automatic Guid scrubbing is turned off. This is not always desirable, though.

The global and fluent APIs do replace named Guids, with or without automatic Guid scrubbing.

The three setting APIs should have the same behavior.

Attached, a very minimal repro project: minimal-repro.zip. The two tests should pass with the same verified file, but they don't.

Versions

I reproduced the issue in two scenarios.

The minimal repro:

A private repository

SimonCropp commented 3 months ago

u should remove the below from you project. it is a bug in VS that puts those in

    <ItemGroup>
      <None Update="UnitTest1.Test1.received.txt">
        <DependentUpon>NamedGuidSnapshotTests.cs</DependentUpon>
      </None>
      <None Update="UnitTest1.Test1.verified.txt">
        <DependentUpon>NamedGuidSnapshotTests.cs</DependentUpon>
      </None>
    </ItemGroup>