Add ThatAre[Not]Structs in TypeSelector.cs#2056
Add ThatAre[Not]Structs in TypeSelector.cs#205694sedighi wants to merge 11 commits intofluentassertions:developfrom
ThatAre[Not]Structs in TypeSelector.cs#2056Conversation
ThatAre[Not]Struct in TypeSelector.cs as mentioned in Issue #645
Co-authored-by: IT-VBFK <[email protected]>
ThatAre[Not]Struct in TypeSelector.cs as mentioned in Issue #645ThatAre[Not]Struct in TypeSelector.cs
…TypeSelectorStructFeature
Pull Request Test Coverage Report for Build 3731314363Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| } | ||
|
|
||
| [Fact] | ||
| public void When_selecting_types_that_are_structs_it_should_return_the_correct_types() |
There was a problem hiding this comment.
🤔 What about record structs?
There was a problem hiding this comment.
i will extend the tests for record structs and i think it should work fine with record structs as well.
ThatAre[Not]Struct in TypeSelector.csThatAre[Not]Structs in TypeSelector.cs
docs/_pages/releases.md
Outdated
| ### What's new | ||
| * Added `ThatAre[Not]Abstract` method for filtering the types - [#2058](https://github.com/fluentassertions/fluentassertions/pull/2058) | ||
| * Added `ThatAre[Not]Abstract` methods to `MethodInfoSelector.cs` for filtering the methods - [#2060](https://github.com/fluentassertions/fluentassertions/pull/2060) | ||
| * Added `ThatAre[Not]Struct` method for Types Filter - [#2056](https://github.com/fluentassertions/fluentassertions/pull/2056) |
|
From my comment in #2061 (comment)
In IL there is no direct concept the C# keyword public struct Foo{}So like Some points of the implementation
To summarize: |
|
I see, there is really a problem with the half and complex types. |
|
On the other hand, a lot of developers may not even be aware of all those special cases and just want to know which of their types in their code base are |
You are right, i also didn't know about these special types that C# offer, but to be honest i'm also new in C# .NET technologies and coming from java. |
As we don't know all future or custom numeric types, we cannot filter them out. To avoid any ambiguities we could have |
Yes, let's do that. @94sedighi what do you think? |
@dennisdoomen It will cover a wider range of types, but we can do it, and there are no edge cases, as far as I know the C#. |
IMPORTANT