-
Notifications
You must be signed in to change notification settings - Fork 163
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
Bug: Using verify with a parameter that is a Map or Iterable should be supported #15
Comments
So this is actually possible today but maybe the interface isn't as nice as it could be. This is how you can do it: verify(myService.update(cssClasses: argThat(equals(['a', 'b'])))) argThat allows you to specify matchers. This is nice because then do can do shallow equals, unordered equals, contains, etc. Here is the fall through code: It looks like @fibulwinter was using identical at one time for the matcher, but then removed it. I'm not sure if there was a specific reason of moving away from the matcher. Maybe just for simplicity. Probably easy enough to switch to equals matcher if there isn't a specific reason for the current pattern. |
The root problem is dart-lang/sdk#2217. To counter this I wanted to use equality matcher by default, but I vaguely remember that there were some complications... Stay tuned. |
Ack, the workaround is good enough for today, but I would like to use equals if it is OK. @fibulwinter: It looks like dart-lang/sdk#2217 is long solved, we commonly use the |
+1 for defaulting to |
Done in 0.11.0 - |
For example:
Should match
(Even though the
cssClasses
List
instance is different)The text was updated successfully, but these errors were encountered: