-
Notifications
You must be signed in to change notification settings - Fork 79
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
Error message when DateTime is not equal does not provide any help #199
Comments
Many database (or thair drivers) store the datetime with the precision of milliseconds. DateTime differs only for fraction of milliseconds. |
Hey @alex-piccione, Let me figure it out: Now, you want to test your record and the type system checks the types if they match and the values if they match, too. Values of the two DateTimes don't match and stringifies it to build a message with it. My recommendation: Restructure your test(s) to test your DateTimes manually with milliseconds.
The summary of the output window will be:
I hope that helps. (P.S.: This could also be the solution for #200.) Just comment if you need further help with it. |
Hi, Thanks for the reply. Is this not the goal of the "equal" assertion failure message? or it is not reasonable to do? Thanks. |
FsUnit nor any other testing framework does this. They only execute the Anyway, this is not reasonable to do for us. We cannot implement every format for every specific type that has a "special" format. Sorry for that. |
Description
When the "equal" check find a DateTime different from what it is expected the error message does not shows the problem. This generated confusion and within the non-formatted code in the message it makes really difficult and time coinsuming try to find out what is the cause of the error.
Repro steps
Expected behavior
I want to see what is the difference between the actual record and the expected one.
Actual behavior
Error message does not provide a clear reason while it fails and it does not shows the difference between the 2 DateTime.
Ideally the error message should mention which property has a different value from what is the expected one.
Known workarounds
Please provide a description of any known workarounds.
Related information
Visual Studio Enterprise 2022.
Stadard Test Explorer window.
The text was updated successfully, but these errors were encountered: