Open tripleslash opened 5 months ago
Hello, I want to co_return something from a mocked function. Something like:
// Instantiate a mock object. Mock<SomeInterface> mock; // Setup mock behavior. When(Method(mock,foo)).CoReturn(1); // Method mock.foo will co_return 1 once.
But the CoReturn method does not exist. How can something like this be achieved?
Maybe you can do it by using the .Do() method and passing it a lambda that uses co_return (if it's possible). But a proper support of coroutines in fakeit should be investigated.
.Do()
co_return
Hello, I want to co_return something from a mocked function. Something like:
But the CoReturn method does not exist. How can something like this be achieved?