Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Unit testing ActionHandlers with Guice
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Chandler  
View profile  
 More options Oct 21, 11:06 am
From: David Chandler <turboman...@gmail.com>
Date: Wed, 21 Oct 2009 08:06:49 -0700 (PDT)
Local: Wed, Oct 21 2009 11:06 am
Subject: Unit testing ActionHandlers with Guice
Inspired by Chris Lowe's recent blog on MVP unit testing, I've worked
out an approach for testing ActionHandler server-side code by calling
them from a DispatchTestService. This has been especially helpful for
rapid testing of AppEngine JDO calls in my ActionHandlers
independently of the client. It's so simple I'm almost embarrassed to
publish it, but that's part of the beauty of gwt-dispatch! At any
rate, I will be grateful for suggestions of any enhancements /
improvements to this approach. Once I get a little feedback, I'll post
a wiki page on ActionHandler unit testing.

http://turbomanage.wordpress.com/2009/10/20/how-to-unit-test-gwt-disp...

/dmc
David Chandler
http://turbomanage.wordpress.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Peterson  
View profile  
 More options Oct 21, 1:55 pm
From: David Peterson <da...@randombits.org>
Date: Thu, 22 Oct 2009 03:55:07 +1000
Local: Wed, Oct 21 2009 1:55 pm
Subject: Re: [gwt-dispatch] Unit testing ActionHandlers with Guice
Hi David,

Looks interesting. One note from my quick scan - you may want to  
consider ways of injecting some of the stuff which is currently coming  
via 'factory' classes directly in your code, particularly if you're  
using Spring or Guice (I'm assuming the latter in your case). That  
will make it simple to swap out the services provided by those  
factories when testing more complex situations. Plus, it's cleaner all  
round anyway :)

David

On 22/10/2009, at 1:06 AM, David Chandler wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Chandler  
View profile  
 More options Oct 21, 2:40 pm
From: David Chandler <turboman...@gmail.com>
Date: Wed, 21 Oct 2009 14:40:18 -0400
Local: Wed, Oct 21 2009 2:40 pm
Subject: Re: [gwt-dispatch] Re: Unit testing ActionHandlers with Guice
Great idea, thanks! I'll move the PersistenceManagerFactory into
Guice. Sooner or later, I think the ActionHandlers will need a
different PersistenceManager in test, although changing out the whole
AppEngine environment works for now.

/dmc
David Chandler
http://turbomanage.wordpress.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google