I am new to GWT development and have written a simple app based upon the HelloMVP sample. I was drawn to this model for A) MVP design with code/UI separation, B) simpler unit testing not requiring GWTTestCase.
My Activity class is somewhat more involved than the sample program, but not hugely. Most examples that I have seen use EasyMock - so I am trying to use EasyMock 3.0. However, I have not been able to get a single test case to compile and run successfully. Attempts to declare a variable of type IMocksControl or IMockBuilder give me the following error: "org.easymock.IMocksControl can not be found in source packages" (why is the source needed for a JUnit test that is supposed to be run outside of the GWT framework?) However, as long as I do it all "in-line" (e.g. createMockBuilder(LoginPlace.class).createMock()) I can create mock objects. Beyond that, to call the XxxActivity.start method, it requires passing a ClientFactory object - that contains references to various other objects (EventBus, PlaceController, defined views). (I assume I need to call "start" so the other methods can be called that use things initialized in start.) Does anyone know of some sample code that includes JUnit TestCase examples for a GWT-MVP app that uses the Activity, Place, ClientFactory model? I have spent a couple days battling this and have not made any progress. I am using Eclipse 3.6.1, GWT 2.1.0, JUnit 4, EasyMock 3.0 on a Windows XP system. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
