dimanche 22 février 2015

(Swing testing) How do I retrieve my components for unit testing with UISpec4J?

I have a step sequencer application that I wrote in Swing using a model-view-controller pattern and a publisher/subscriber paradigm. I'm currently trying to test it using UISpec4J. From what I can tell, UISpec creates a container once you get the main window, and this container holds the main window's instance variables as well as various attributes.


My question is, how can I retrieve the components instantiated in the main window so I can test their methods and variables? I'm trying to retrieve the controller so I can get the soundbank, the note square grid, number of beats etc. in order to test them. I can't find the right method to use. Any help would be greatly appreciated.


test code: http://ift.tt/17oWYNo


workspace: http://ift.tt/17oWZRD


Aucun commentaire:

Enregistrer un commentaire