Unit testing a servlet

6 views
Skip to first unread message

Sydney

unread,
Feb 22, 2012, 5:17:41 PM2/22/12
to gwt-pl...@googlegroups.com
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?
Reply all
Reply to author
Forward
0 new messages