Why GWTTestCase only accept IsSerializable interface for serializing java objects?

86 views Asked by At

I have several model class that implement java.io.Serializable interface (for serialization purpose) and they work perfectly in devmode and webmode but when i want to use them in a GWTTestCase after running test i get this error:

Type 'com.saeed.test.model.MyModel' was not assignable to 
'com.google.gwt.user.client.rpc.IsSerializable'
and did not have a custom field serializer.
For security purposes, this type will not be deserialized.

I mention that MyModel class does not have default constructor(but works perfectly in devmode and webmode).

How can i fix this problem?

1

There are 1 answers

0
appbootup On

Please go through GWT RPC's user test suite here and rpc test suite here

You might also have to follow how GWT sets up its RPC tests.