-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Splatting parameters in ParameterFilter of Assert-MockCalled #862
Comments
@davebrannan, what about your results? |
I assume that the issue can be closed now. Feel free to reopen if you need more assistance. |
I would like to have it reopened as there isn't a valid workaround to use a |
This might be complimentary #1158 and #1162 where we could explicitly provide context to the scriptblock . This would possibly simplify testing among scopes, and would not require the user to understand in which scope the scriptblock is invoking, because then we would simply invoke it in the most logical scope, and not in the most practical scope (eg. |
Most of the problems of moving parameters to the right scope should be solved by running the parameter filter in the test scope which is how it is done now. Since this was not requested by anyone else, and it seems to complicate the already complicated situation around mocking I am closing this as won't fix. |
I was wondering if it's possible to use a hashtable within the
ParameterFilter
ofAssert-MockCalled
? An example might clear things up:It would really be great to be able to use
Assert-MockCalled DoStuff -Exactly 1 -Scope it -ParameterFilter {@DoStuffParams}
, because the hashtable$DoStuffParams
is filled in the production script with data/parameters.Thank you for your help.
The text was updated successfully, but these errors were encountered: