I struggled for quite a bit with this so I can sympathize with you.
Here is what I ended up doing.
I created a second module resource file. So if your main module
resource file is called X.gwt.xml, create another one called
XJUnit.gwt.xml. It is in this 2nd file that you put you the servlet
path definition to point to the mock RPC service. See example below
Main module definition file
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name="com.google.gwt.user.User"/>
</module>
Module Definition file for controlling your JUnit runs
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name="com.google.gwt.user.User"/>
<servlet path="/rpcservice.html"
class="com.acme.gwt.server.rpc.mock.RPCServiceImplMock"/>
</module>
When you create your GWTTestCase classes, make sure that the
GWTTestCase.getModuleName() returns the JUnit version of your module
thus :
public String getModuleName() {
return "com.acme.gwt.XJUnit";
}
I like this because it actually does test the ability of lack thereof
of you RPC functions to work. I incidentally discovered that all my
serializable beans that were tagged using the newly introduced (as of
1.4 anyway) Seriable marker interface would not work so I had to
revert to marking them using IsSerializable instead.
Happy coding.
Melody
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---