snapshooter
snapshooter copied to clipboard
Add support for lambda expressions instead of json path for ignore and accept
When using fluent assertions, e.g. person.Should().MatchSnapshot() or the static snapshot class, e.g. Snapshot.Match(person) a generic overload now ensures that we can use lambda expressions to accept and ignore fields.
Examples:
Snapshot.Match(testPerson, snapshotName, o => o.AcceptField(p => p.Age));
testPerson.Should().MatchSnapshot(o => o
.AcceptField(m => m.Firstname)
.AcceptField(m => m.DateOfBirth)
.IgnoreFields(m => m.Children['*'].Name));
Quality Gate passed
The SonarCloud Quality Gate passed, but some issues were introduced.
88 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code







