Urs Enzler
Urs Enzler
After some debugging through FluentAssertions, I found out that the above test fails when the string values for `S` differ, but not when the integer values for `I` differ. I...
Yes. From F# code you can use e.g. `FSharpType.IsRecord`
Another solution for my problem would also be when I could register a callback with the following signature: `Func` with `ComparisonMode` something like `enum ComparisonMode { ByMember, ByValue }` Then...
I think that would work. Should I try to contribute that? I probably need some help though. I don't really understand the code around `SelfReferenceEquivalencyAssertionOptions`, which is somehow involved in...
We probably should change the Signature to: `ComparingByMembers(Func predicate)` So I can pass `null` when I want to use the default behaviour. Otherwise, I have to handle every type on...
You can find my prototype at https://github.com/ursenzler/fluentassertions/tree/comparingByMembersCallback. I went a bit a different approach. I don't see the solution with a collection of Funcs. My use case works correctly this...
Ah, now I understand: Collecting a collection of `Func` When checking for equality then look if there is an entry for the type in the collection: | found none ->...
Okay, after misunderstanding everything :-D, here a new - hopefully better - version: https://github.com/ursenzler/fluentassertions/blob/f3598478a92f20172a5d8fcb69d0a65aa93ad1a2/Src/FluentAssertions/Equivalency/SelfReferenceEquivalencyAssertionOptions.cs#L165 This time with some Facts, as well.
Should I change anything, or open a PR?
That could be a simpler solution than https://github.com/fluentassertions/fluentassertions/pull/1383/ I'll check it against our codebase.