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
[FluentResults.Extensions.FluentAssertions.Test] HaveMetadata breaks when new string
is used
#169
Comments
Okay, so turns out, swapping out var testValue = String.Join(", ", new [] {"test1"});
// To
var testValue = String.Join(", ", new [] {new string("test1")});
// Or
var testValue = String.Join(", ", new [] {"aatest1".Substring(2)}); Causes the |
WhoAteDaCake
changed the title
[FluentResults.Extensions.FluentAssertions.Test] HaveMetadata behaves differently for same result types
[FluentResults.Extensions.FluentAssertions.Test] HaveMetadata breaks when Dec 8, 2022
new string
is used
The second line is not buildable in my vs (.net 6). Which .net version do you use? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following fails in my XUnit test suite:
Where
result
is the real value I'm trying to check andtestResult
is a variable I've created to try and duplicate. As you can see bellow they have the same structure.However, the
result
assertions fail, buttestResult
don't. I've then tried to step through the actual actions of the assertion, where I've found the following issue (result
assertion).The equality comparison here returns false for "obj == metatdataValue
, but when I tried
obj.Equals(metatdataValue)` it returned true.Do you have any idea why would this be happening, or what would be a way to fix it? Sorry if it's obvious, I'm quite new to dotnet
The text was updated successfully, but these errors were encountered: