[JAVA-2773] Unit testing MongoIterable in async driver Created: 05/Feb/18 Updated: 28/Oct/23 Resolved: 06/Feb/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Rohit Jain | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I am looking for ways to unit test MongoIterable. Is there a way I could mock response back from mongo before any action(forEach() etc) is invoked on it via iterator ? |
| Comments |
| Comment by Ross Lawley [ 06/Feb/18 ] |
|
Hi rohit.jain, As MongoIterable is an interface, you are welcome to Mock it and return canned results. Perhaps, follow up in one of the forums mentioned below and include more information about your requirements and aims with mocking the results. For future reference this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a boarder audience there. If your business requires an answer from MongoDB within a time frame then we do offer production support. If you do follow up via one of the options above please post a link and I will follow the conversation there. All the best, Ross |