Thanks for the info, Greg. I did have a *very* quick look at the SwingDemo, but I wasn't clear about exactly what is required of an ApplicationContext. My initial thought was that it might be simple to create a new UnitTestApplicationContext, but then the size of DesktopApplicationContext suggested otherwise.
My dirty hack works for now, but I will create a JIRA wish for UnitTestApplicationContext, and try to follow up later. Chris On 29 June 2011 18:43, Greg Brown <[email protected]> wrote: > > 1) Is there an 'official' minimum version of JUnit expected for Pivot's > > build? > > I believe it is 4.7. > > > 2a) Has there ever been a discussion on unit testing Pivot GUIs, using > real > > Components and a real Display? > > > > 2b) If so, did the idea of a UnitTestApplicationContext come up, or is it > > worth considering? > > This is an interesting idea, as is the concept of a headless Display. > > > I hacked together a quick 'unit test Display provider' by instantiating a > > custom Application with DesktopApplicationContext and waiting until a > static > > Display field was set. > > Take a look at the Swing demo for an example of creating a custom > application context. > > > 3) Are unit tests that require a Display deliberately avoided so that the > > build can run in headless environments? > > Yes, that's part of it. But you are right - there are definitely ways to > make this work. > > G > >
