Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    what exactly is the issue? passing the selected entity to the dialogue? Commented Sep 13 at 14:27
  • What pane does with the dialog besides showing it and taking result? Commented Sep 18 at 10:26
  • Have you considered injecting a set of Actions (like Swing actions, grouping an icon, label and the code)? Then you would not need to inject multiple types, multiple copies of a single mock would be enough. Commented Sep 18 at 10:27
  • @Basilevs "A set of Actions" sounds like a class to me anyway. Then, it's essentially the same as what Doc Brown suggested (except each item contains a little bit more than just code) Commented Sep 18 at 14:41
  • @SergeyZolotarev the key difference is that instead of injecting each dialog separately, Actions provides a common interface, allowing batch injections, which is much easier to mock. Commented Sep 18 at 15:32