Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Unit testing a servlet
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
  1 message - 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
 
Sydney  
View profile  
 More options Feb 22, 5:17 pm
From: Sydney <sydney.henr...@gmail.com>
Date: Wed, 22 Feb 2012 14:17:41 -0800 (PST)
Local: Wed, Feb 22 2012 5:17 pm
Subject: Unit testing a servlet

I’d like to test my app. I am familiar with unit testing but not in a GWTP
context. I have a servlet that I want to test. The servlet is like this:
public class MyServlet extends HttpServlet { private final Provider<MyDao>
daoProvider; @Inject public MyServlet(final Provider<MyDao> daoProvider) {
this.daoProvider = daoProvider; } @Override public void doPost(...) { MyDao
dao = daoProvider.get(); List<A> list = dao.getAs(); for(A a: list) { //
Process on A a.setNewValue(newValue); } // Save in the datastore the
modification dao.updateList(list); } How would you test that the process on
the list of A has been done correctly?


 
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 »