-
Notifications
You must be signed in to change notification settings - Fork 164
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
Recipe for funtion call verification within stream matchers #341
Comments
Thanks for the question. I think I partially understand it :). FIrst, when you say "I want to verify whether the put() has been called in the stream," I'm a little lost. This is the first mention of a method called Second, "has been called in the stream" is not a concept I'm comfortable with sticking to. A stream is just a sequence of objects, it is not a... sequence of actions or of method calls... I'll hazard a guess that you want to verify that, in the process of listening to the stream, and reading objects out of it, If this is the case, why not just use the standard |
@srawlins thanks for the comment. :) I want to verify that as a side effect, the local database, in this case hive, is receiving a write request, which is something I want to be sure about in this unit. mockBox.put is you are right about streams, I also want to stick to thinking of streams as a series of events. I just want to verify if whether a method for a side effect has been called from when the execution started to when the stream was closed. problem with using the standard verify() is, that I can not await the expect() in with StreamMatcher. This means the verify will be executed before stream has closed. I would be thankful if someone could show me how to put a verify inside an expectLater. |
Code that I want to test:
My test:
Purpose
I want to verify whether the put() has been called in the stream, and can not find any example where I can add the verify method for this use case.
Preferred Solution
I would like to have something like this...
The text was updated successfully, but these errors were encountered: