Would this help? Mocking GWT Asynchronous Services (with JMock) http://www.jmock.org/gwt.html
Note that this example doesn't even require a GWTTestCase, which means your tests will run much faster, but you won't get any of the JavaScript support offered by hosted mode. This might require restructuring your code a bit so you're not invoking any GWT library code that uses native JavaScript (e.g. widgets) or GWT.create(), but I've found having more of these fast tests helps keep my state of flow while coding. If you do have widgets in your test, you can also use GWTMockUtilities to mock those as well - assuming they get passed in as dependencies. Would this work for you? Dan On Mar 26, 10:20 am, denis56 <[email protected]> wrote: > Hello, > > I would like to unit test my application plugging a mock remote > service implementation. As far as I know in version 1.5 that is being > used, hosted mode uses > <servlet path="/myService" class="test.myServiceImpl" /> > line in module.gwt.xml file to refer to the right servlet. > > Who knows if if there is a programmable way so that in a junit set-up > method one could specify that another (mock) service should be used, > without having to replace the appropriate line in xml? > > thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
