Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot is equal #113

Open
nscheibe opened this issue Nov 29, 2020 · 3 comments
Open

Snapshot is equal #113

nscheibe opened this issue Nov 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@nscheibe
Copy link
Member

Usually the object.MatchSnapshot(...) or Snapshot.Match(...) throws an exception if the snapshot does not match.

Now people asked for an option without exception, but with a boolean as return value.

I thought about the following syntax:

  • bool Snapshot.IsEqual(...)
  • bool object.Snapshot().IsEqual()
  • bool object.IsEqualSnapshot()
@nscheibe nscheibe added the enhancement New feature or request label Nov 29, 2020
@nscheibe
Copy link
Member Author

Thx @glucaci for this proposals!

@glucaci
Copy link
Member

glucaci commented Dec 3, 2020

Thanks, nice!

I vote for object.Snapshot().IsEqual() beacuse afterwords we can provide also object.Snapshot().Match() or other extensions.

@OneCyrus
Copy link
Contributor

+1

how about an extension method for test frameworks like xunit to also fix #133

  • Assert.Snapshot(..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants