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

Website: replace deleted assertion extensions #161

Open
BrainCrumbz opened this issue Feb 6, 2017 · 6 comments
Open

Website: replace deleted assertion extensions #161

BrainCrumbz opened this issue Feb 6, 2017 · 6 comments

Comments

@BrainCrumbz
Copy link
Collaborator

@amirrajan , at some point during the port to .NET Core, we decided to drop almost all assertion extensions from NSpec library, only a few remained: IsTrue, IsFalse, ShouldBeTrue, ShouldBeFalse.

This means that many code examples in website should be modified because of this 😰

PS for those remaning assertions: naming was changed to classical .NET style. If there's pressure, we can rename them with previous style (foo_bar_baz).

@amirrajan
Copy link
Collaborator

Oh geez, is Fluent Assertions core compatible?

@BrainCrumbz
Copy link
Collaborator Author

It says so:

It runs on .NET 4.0, 4.5, 4.6, CoreClr, .NET Native, Windows 8.1, Silverlight 5, Windows Phone 8.0…

When we started porting, at that time it wasn't and so sample used to show how to configure solution in .NET Core uses Shouldy as well. At this level of usage, they look the same:

it["Should return same number"] = () => first.ShouldBe(second);

@BrainCrumbz
Copy link
Collaborator Author

@amirrajan what's your take about it?

(A) Convert every assertion to the form (some predicate).ShouldBeTrue()?
(B) Convert assertions (where needed) to FluentAssertions form, and state that for those examples we're using it?
(C) Convert assertions (where needed) to FluentAssertions form, and state that for those examples we're using it?
(D) ... add yours!

I'd go for B, or C as second place.

@BrainCrumbz
Copy link
Collaborator Author

@amirrajan now syntax highlighting seems to work, maybe not perfect but still...

How should we move on with this issue? Maybe it's a good time to copy contents from gists to page, and at the same time replace assertions with the one we choose.

@BrainCrumbz
Copy link
Collaborator Author

BrainCrumbz commented Sep 4, 2017

BTW it seems there's a typo in bulleted list above (A ... D): points B and C are the same, and at this point it's not really clear what was the alternative to FluentAssertions form: Shouldy? previous snake_case style?

@amirrajan
Copy link
Collaborator

I'd say got with FluentAssertions and whatever casing convention they support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants