Re: How to run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-06-09 Thread Carl Pritchett
 If you're using EasyMock, this is a very easy way to mock a service.
 Been using this for a long time.

http://robvanmaris.jteam.nl/2008/04/22/test-driven-development-for-gwt-ui-code-with-asynchronous-rpc/

This is a great method. I was using EacyMocks Catpure method to do the
same thing;

CaptureAsyncCallbackSomeModel captureCallback = new
CaptureAsyncCallbackSomeModel();
mockServiceAsync.getModel(and(capture(captureCallback),
isA(AsyncCallback.class)));

captureCallback.getValue().onsuccess(someModelInstance);

Carl.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-05-31 Thread Tristan
If you're using EasyMock, this is a very easy way to mock a service.
Been using this for a long time.

http://robvanmaris.jteam.nl/2008/04/22/test-driven-development-for-gwt-ui-code-with-asynchronous-rpc/

Take a particular look at AsyncCallbackMockSupport class.

Cheers!

Tristan

On May 30, 8:16 pm, Trung gwtdevelo...@gmail.com wrote:
 See this thread

 http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
 discussing GWT RPC calls from Java

 On May 28, 3:39 pm, Sumit Somani sumitsom...@google.com wrote:



  I am an engineering intern and want to write a test for a class which
  makes a Async Request to the server How do I juct mock it up or use
  some pre-built library. Please provide advise on resources

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-05-30 Thread Trung
See this thread

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a870643861023d35
discussing GWT RPC calls from Java



On May 28, 3:39 pm, Sumit Somani sumitsom...@google.com wrote:
 I am an engineering intern and want to write a test for a class which
 makes a Async Request to the server How do I juct mock it up or use
 some pre-built library. Please provide advise on resources

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-05-28 Thread Sumit Somani

I am an engineering intern and want to write a test for a class which
makes a Async Request to the server How do I juct mock it up or use
some pre-built library. Please provide advise on resources

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-05-28 Thread Thomas Broyer


On May 28, 10:39 am, Sumit Somani sumitsom...@google.com wrote:
 I am an engineering intern and want to write a test for a class which
 makes a Async Request to the server How do I juct mock it up or use
 some pre-built library. Please provide advise on resources

Some pointers:
Actually making the calls:
http://code.google.com/webtoolkit/doc/latest/DevGuideTesting.html#DevGuideAsynchronousTesting
Mocking the service so you can test the calling code:
http://code.google.com/webtoolkit/articles/testing_methodologies_using_gwt.html
http://googletesting.blogspot.com/2009/08/tott-testing-gwt-without-gwttest.html
http://googletesting.blogspot.com/2009/02/with-all-sport-drug-scandals-of-late.html
http://googletesting.blogspot.com/2008/06/taming-beast-aka-how-to-test-ajax.html
http://googletesting.blogspot.com/2008/08/taming-beast.html

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.