Re: Disabling serialization in wicket tester....
On Sun, Aug 1, 2010 at 5:11 AM, Kent Tong wrote > I would like very much to disable serialization in wicket tester. I > am using pages with mockito mocks that are not serializable (and why > should they in a unit test). I am using workarounds now. You can take a look at http://wicketpagetest.sourceforge.net which > allows you to inject non-serializable mocks into your pages. I have already solve the problem myself now using a SerializableProxyFactory which creates serializable proxies for a mock: http://utils.wamblee.org/support/general/apidocs/org/wamblee/general/SerializableProxyFactory.html Will also have a look at the library you are suggesting. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Disabling serialization in wicket tester....
> I would like very much to disable serialization in wicket tester. I > am using pages with mockito mocks that are not serializable (and why > should they in a unit test). I am using workarounds now. You can take a look at http://wicketpagetest.sourceforge.net which allows you to inject non-serializable mocks into your pages. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disabling serialization in wicket tester....
Will mockito let you mock more than one class at once? If so, you can add Serializable to the list. On Jul 31, 2010 5:40 PM, "Erik Brakkee" wrote: > That my tests will not be equivalent is no big problem. In this case I am > really unit testing the pages while mocking the backend. That allows me to > also test anomalous behavior of the backend. > > In addition, I am also doing unit integration testing with rendering wicket > pages with an actual JPA backend with a relatively complete environment > including transactions and JPA. So, overall my unit tests cover the > functionality quite well. > > The trick I am doing now is storing the mock in a static variable of the > test class and then creating a serializable proxy using LookupProxyFactory ( > http://utils.wamblee.org/support/general/apidocs/org/wamblee/general/LookupProxyFactory.html ) > to lookup the mock dynamically. I guess this is screaming again for another > test utility on top of mockito for creating serializable mocks (if I cannot > solve it in wicket). > > Any suggestions on how to disable serialization in wicket tester?
Re: Disabling serialization in wicket tester....
That my tests will not be equivalent is no big problem. In this case I am really unit testing the pages while mocking the backend. That allows me to also test anomalous behavior of the backend. In addition, I am also doing unit integration testing with rendering wicket pages with an actual JPA backend with a relatively complete environment including transactions and JPA. So, overall my unit tests cover the functionality quite well. The trick I am doing now is storing the mock in a static variable of the test class and then creating a serializable proxy using LookupProxyFactory ( http://utils.wamblee.org/support/general/apidocs/org/wamblee/general/LookupProxyFactory.html) to lookup the mock dynamically. I guess this is screaming again for another test utility on top of mockito for creating serializable mocks (if I cannot solve it in wicket). Any suggestions on how to disable serialization in wicket tester?
Re: Disabling serialization in wicket tester....
Your tests will not be equivalent .. ** Martin 2010/8/1 Erik Brakkee : > Hi, > > > I would like very much to disable serialization in wicket tester. I am using > pages with mockito mocks that are not serializable (and why should they in a > unit test). I am using workarounds now. > > Is there an easy way in wicket tester to disable the serializations that > occur? > > Cheers > Erik > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org