When I first started working with JBehave, I wrote a Tetris game. I had trouble finding Swing harnesses that didn’t depend on JUnit. So I wrote one.
JBehave 2.0 won’t include Swing support. The harness was completely independent of JBehave anyway. So, we decided that I should pull it out into its own project.
At the moment, it works by finding a named window and components. Here’s an example of how to use it:
WindowControl control = new WindowControl("my.named.frame");
I’ve tried to make it fast, minimal and extensible, since everyone seems to want different things from their Swing harness. If you have a request for a feature, please let me know!
A shout goes out to Szczepan for the gorgeous Mockito, which I used in the
tests examples. Finally, mocks that can do Given / When / Then, instead of Given / Expect / Finish recording / When / Then go back to expectations cos you’ve forgotten what you wanted your code to do in the first place.
See lots of examples, together with Mockito beauty, here.