Open ConorMurphy21 opened 3 years ago
There is no built-in way for that as far as I know, you can manually do it by mocking these functions with a Do
and passing a lambda that increment a counter but I guess you were asking for a built-in solution.
Obviously the Do
can be used, but an alternative could be adding a function that returns the number of invocations, then you could manually Assert etc. Not sure if there is a nicer syntactically sugary way to do this.
I'm trying to verify that one of the overloaded method signatures gets called. I don't care which one gets called. Is there a way I could do this with fakeit? ie Verify(Method(foo, bar) || Method(Foo, bar)).Twice(). Or if that doesn't exist is there a way to get the invocation count of a method so I can just add them together?