You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2018. It is now read-only.
I'm stuck with my unittesting to the point, where I have to check the named arguments passed to a mock.
I can't find a workaround, so I hope this issue is gonna be addressed soon.
<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="96" height="96"hspace="10"> Issue by seaneagan
Originally opened as dart-lang/sdk#14725
In LogEntry:
String methodName;
List arguments;
should be replaced with
Invocation invocation;
And the CallMatcher concept should be replaced with true Matchers against Invocations.
That way named arguments are supported, and less concepts and API surface are needed.
Then callsTo could support a Symbol as the member name, and could be implemented itself with noSuchMethod, allowing to use named arguments as well:
callsTo(#foo, new isInstanceOf<String>(), someNamedArg: isNotNull);
which would match calls like:
mock.foo('a String', someNamedArg: notNull);
The text was updated successfully, but these errors were encountered: