GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [PR open] Add feature to verify static methods calls in order · Issue #2548 · mockito/mockito Closed DescriptionTL;DR Mockito doesn't allow verifying static methods calls in order. I have implemented this feature here: #2549. If possible, I'd like to contribute; or discuss other ways to achieve the same. Hey Mockito team. This discussion relates to: https://groups.google.com/g/mockito/c/wjd9jIj_oBs. Since I'm not sure that the Google group is active, I'm posting it here for now. This issue is about verifying static methods calls in order. I'm aware of the InOrder class, but we can't pass a MockedStatic instance. I had a closer look, and we can pass to it a Class instance. But the InOrder interface is not powerful enough to verify that a static method has been called: To verify static calls, using method references and lambdas, we likely need two more methods in the InOrder interface, with signatures similar to MockedStatic#verify: What do you think of the InOrder interface exposing two methods to deal with the MockedStatic objects that accept both the MockedStatic and the Verification instances to use? Like the following: I made the above changes, and we can verify static methods, together with instance methods too. I have updated the tests as well in my PR. Let me know if you are aware of other ways to achieve the same. If it is not doable, then please share your thoughts about the above, and if I can contribute in case. Reacted by Roberto Cella and ododa Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |