Replies: 2 comments 2 replies
-
If you create passing and failing code examples, it would be easier to help you find // passing example
var subject = new ...
var expected = new ...
subject.Should().Foo(expected);
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Something like: or even |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm guessing there isn't a way to convert data types in the assertion, but wanted to make sure we're not missing a better way to perform an assertion for a specific scenario.
We commonly perform grid column sort order tests with List.Should().BeInDescending/AscendingOrder(). The grid column values are always strings (grabbing off GUI), so the process is as follows:
-Sort column
-Logic to determine column data type
-Create list, converting from string to "target" data type of int/currency/date/etc. when needed (if not converted, FA's fail/pass unexpectedly)
-Perform FA
Is there a way for us to simply create the list of strings and then perform the FA and give it the "target" data type so the string list is evaluated as an int/currency/date/etc?
Beta Was this translation helpful? Give feedback.
All reactions