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

Use Custom DSL instead of Inheriting NUnit.Framework.Is #57

Closed
lilasquared opened this issue Feb 27, 2020 · 5 comments · Fixed by #72
Closed

Use Custom DSL instead of Inheriting NUnit.Framework.Is #57

lilasquared opened this issue Feb 27, 2020 · 5 comments · Fixed by #72
Labels
enhancement New feature or request Hacktoberfest
Milestone

Comments

@lilasquared
Copy link
Contributor

lilasquared commented Feb 27, 2020

Is your feature request related to a problem? Please describe.
Suppose I had multiple NUnit extensions similar to Snapper, I would not be able to use all Is DSL methods in a single file without using FQDN of the Is Class

ex:
Assert.That(obj, Snapper.Nunit.Is.EqualToSnapshot());

Describe the solution you'd like
I think it would be more declarative and composable to have a custom class, something specific to the domain of Snapper.

ex:
Assert.That(obj, Matches.Snapshot());
Assert.That(obj, Matches.ChildSnapshot("some-snap"));

Great work with this library, I was actually the one who opened nunit/nunit#2392 in the Nunit repo, and this is exactly what I was envisioning!

@lilasquared lilasquared added the enhancement New feature or request label Feb 27, 2020
@theramis
Copy link
Owner

theramis commented May 2, 2020

Hey @lilasquared,

Sorry for the late reply, had a bit of a break and only focused on bugs for a bit.
I like the solution you are suggesting and I reckon I'll probably implement it.

I'm not sure how/when to release this though. It would be a breaking change if I got rid of Snapper.Nunit.Is.

Maybe I'll add the new Matches class and mark the Snapper.Nunit.Is class as deprecated with a minor bump of the package.

Then in a future major bump I'll remove the Snapper.Nunit.Is class.

Thoughts?

@lilasquared
Copy link
Contributor Author

lilasquared commented May 2, 2020 via email

@theramis theramis added this to the v2.3.0 milestone Oct 1, 2020
Repository owner deleted a comment from allcontributors bot Dec 6, 2020
@theramis
Copy link
Owner

theramis commented Dec 6, 2020

@all-contributors please add @lilasquared for ideas

@allcontributors
Copy link
Contributor

@theramis

I've put up a pull request to add @lilasquared! 🎉

@theramis
Copy link
Owner

Released in v2.3.0

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

Successfully merging a pull request may close this issue.

2 participants