Re: Wicket And EasyMock

2009-05-20 Thread Alica
Suite.java:203)
>>  at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>>  at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>  at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>  at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>  at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>  at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> Caused by: java.io.NotSerializableException:
>> org.easymock.internal.ObjectMethodsFilter
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>>  at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>>  at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>>  at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>>  at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>>  at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>>  at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>>  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>>  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>>  at
>> org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:117)
>>  ... 31 more
>>
>> Here's my code. I don't get to the onSubmit method of the button.
>>   
> 
> -- 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Wicket-And-EasyMock-tp15663913p23632363.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket And EasyMock

2008-02-25 Thread Nino Saturnino Martinez Vazquez Wael

Look at the blog tutorial. it uses easy mock for some of the testing...


http://cwiki.apache.org/WICKET/blog-tutorial.html

carloc wrote:

Hi I'm trying to use wicketTester and FormTester together with easymock.
I seem to be getting a lot of notserializableexceptions and my form won't
submit properly.
Is there anything that I should do?

ERROR - Objects- Error serializing object class
com.ccti.bo.login.LoginPage [object=[Page class =
com.ccti.bo.login.LoginPage, id = 0, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: org.easymock.internal.ObjectMethodsFilter
Field hierarchy is:
  0 [class=com.ccti.bo.login.LoginPage, path=0]
private com.ccti.service.user.UserService
com.ccti.bo.login.LoginPage.userService [class=$Proxy0]
  protected java.lang.reflect.InvocationHandler
java.lang.reflect.Proxy.h [class=org.easymock.internal.ObjectMethodsFilter]
<- field that is not serializable
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:342)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at
org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:678)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at
org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:125)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at 
org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1085)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:197)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:806)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)
at org.apache.wicket.Session.requestDetached(Session.java:1364)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:384)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:372)
at
org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
at 
com.ccti.bo.login.LoginPageTest.testFailedLogin(LoginPageTest.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.io.NotSerializableException:
org.easymock.internal.ObjectMethodsFilter
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.ja

Re: Wicket And EasyMock

2008-02-24 Thread Timo Rantalaiho
On Sun, 24 Feb 2008, carloc wrote:
> Hi I'm trying to use wicketTester and FormTester together with easymock.

Lately I've often overriden the newSessionStore method of 
the Application subclass to return new HttpSessionStore() in
the testing version of the application. This has helped on
some strange serialization issues with WicketTester of 1.3.


If you're interested in test-driving (or even behavior-driving)
Wicket components, and work on Java 5 or above, I can recommend 
jdave-wicket which has the excellent jMock 2 integrated into it.

  
http://svn.laughingpanda.org/svn/jdave/trunk/jdave-examples/src/test/jdave/examples/wicket/DictionarySpec.java

  http://www.jdave.org/usage.html

Having used EasyMock 1 and 2 and now jMock 2 with JDave, I'd
say that mocking has never felt as easy and straightforward
for me as with jMock 2.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket And EasyMock

2008-02-24 Thread Johan Compagner
   at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>   at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>   at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>   at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>   at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>   at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>   at
> org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:117)
>   ... 31 more
>
> Here's my code. I don't get to the onSubmit method of the button.
> --
> View this message in context:
> http://www.nabble.com/Wicket-And-EasyMock-tp15666876p15666876.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket And EasyMock

2008-02-24 Thread cwilkes

 See this post on the easymock sourceforge bug page:
 
http://sourceforge.net/tracker/index.php?func=detail&aid=1895630&group_id=82958&atid=567840


carloc wrote:
> 
> Hi I'm trying to use wicketTester and FormTester together with easymock.
> I seem to be getting a lot of notserializableexceptions and my form won't
> submit properly.
> Is there anything that I should do?
> 
> ERROR - Objects- Error serializing object class
> com.ccti.bo.login.LoginPage [object=[Page class =
> com.ccti.bo.login.LoginPage, id = 0, version = 0]]
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: org.easymock.internal.ObjectMethodsFilter
> Field hierarchy is:

-- 
View this message in context: 
http://www.nabble.com/Wicket-And-EasyMock-tp15666876p15667171.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket And EasyMock

2008-02-24 Thread carloc

Actually wickettester works fine with a normal button but doesn't work with
an indicating ajax button.
-- 
View this message in context: 
http://www.nabble.com/Wicket-And-EasyMock-tp15666876p15666962.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket And EasyMock

2008-02-24 Thread carloc
7)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:117)
... 31 more

Here's my code. I don't get to the onSubmit method of the button.
-- 
View this message in context: 
http://www.nabble.com/Wicket-And-EasyMock-tp15666876p15666876.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]