-
Notifications
You must be signed in to change notification settings - Fork 57
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
Improve test consistency by using only FluentAssertions
#334
Comments
I looked through the codebase, and I saw 250 In my projects I always only use FluentAssertions. There is nothing wrong with using both, but I am curious what the maintainers would like in these sort of cases. |
Hi @sander1095,
In this case, you are right, it should be
Ans I agree too it would be nice to use only |
I'm ok to refactor and use only About the matching, it is sometimes hard to predict the right amount of what we should assert in those integration tests. We know this is not good, but we will address them in all of our SDKs in the future (after v1) otherwise is a real pain to deal with minor updates during the pre-release time 😅. |
FluentAssertions
Description
An example, though others can be found as well: https://github.com/meilisearch/meilisearch-dotnet/blob/main/tests/Meilisearch.Tests/IndexTests.cs#L167
This line allows the
Limit
property to be1
or greater. As far as I know, the result will always be 1; the next line actually says that only 1 is the allowed outcome (This is duplicate code and I created #333 for this).Basic example
So why do we use
BeGreaterOrEqualTo(1)
? In this case, we should be usingBe(1)
.I would suggest that we go through
IndexesTests.cs
at least, and clean up these kind of tests by narrowing down the accepted test results.Other
Any other things you want to add.
The text was updated successfully, but these errors were encountered: