Setup to check Func<> parameters #1458
-
Defined function: public async Task WrapperAsyncFunc(Func<SomeType, Task> someAsyncFunc); Function Call: await WrapperAsyncFunc( (someTypeParameter) => SomeAsyncFunc(SomeTypeParameter, parameterToCheck)); Moq Setup (not optimal): Setup(x => x.WrapperAsyncFunc((It.IsAny<Func<SomeType, Task>>()).Returns(Task.CompletedTask); How I can make a setup where I can check if "paramaterToCheck" was used? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
kzu
Jun 14, 2024
Replies: 1 comment
-
This might be useful: https://stackoverflow.com/a/67764586/24684 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kzu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might be useful: https://stackoverflow.com/a/67764586/24684