We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assert.Equivalent does not compare the value of two decimal value.
Sample code 1: Assert.Equivalent(1m, 2m)
Assert.Equivalent(1m, 2m)
Expected result: Exception throw
Observation: Statement run successfully
Sample code 2:
class TestObject { public decimal Value { get; set; } } Assert.Equivalent(new TestObject() {Value = 1m}, new TestObject() {Value = 2m}) ;
The text was updated successfully, but these errors were encountered:
Wow, TIL that Type.IsPrimitive returns false for decimals.
Type.IsPrimitive
false
Sorry, something went wrong.
xunit/xunit#2913: Assert.Equivalent behaves incorrectly with decimal …
884e685
…values
#2913: Assert.Equivalent behaves incorrectly with decimal values (v2)
e3c980f
#2913: Assert.Equivalent behaves incorrectly with decimal values (v3)
34f9001
Available in v2 2.7.1-pre.15 Available in v3 0.1.1-pre.392
2.7.1-pre.15
0.1.1-pre.392
https://xunit.net/docs/using-ci-builds
No branches or pull requests
Assert.Equivalent does not compare the value of two decimal value.
Sample code 1:
Assert.Equivalent(1m, 2m)
Expected result:
Exception throw
Observation:
Statement run successfully
Sample code 2:
Expected result:
Exception throw
Observation:
Statement run successfully
The text was updated successfully, but these errors were encountered: