Re: Writing a unit test that goes through result-types

2009-03-05 Thread Timothy Astle
.java:141) ... 34 more Greg Lindholm wrote: You can take a look at this: http://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions/ I've used it to unit test actions all the way through interceptors, validation, actions, and results including freemarker result types. Timothy A

Re: Writing a unit test that goes through result-types

2009-03-05 Thread Timothy Astle
vent = new ServletContextEvent( servletContext); tilesListener.contextInitialized(event); } . Timothy Astle wrote: Thanks for the tip Greg. I quickly went through the debugger based on the example here: http://depressedprogrammer.wordpress.com/2007/06/18/un

Re: Writing a unit test that goes through result-types

2009-02-25 Thread Timothy Astle
emarker result types. Timothy Astle wrote: I had tried using proxy.execute(), which will use Struts. Maybe that's where I'm a bit lost. I don't implement execute() because of my CRUD approach. Can someone point me to some appropriate struts 2 junit tests so I can figure this out?

Re: Writing a unit test that goes through result-types

2009-02-23 Thread Timothy Astle
are creating an action and invoking a method on it, Struts is not involved at all in that. You might want to look at the struts junits to see how you can invoke an action. musachy On Mon, Feb 23, 2009 at 12:57 PM, Timothy Astle wrote: I'm following the approach given here for writing unit tes

Writing a unit test that goes through result-types

2009-02-23 Thread Timothy Astle
I'm following the approach given here for writing unit tests for actions: http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ My Problem: I want to write a unit test that will verify that getSettings() returns back a JSON string. However, when I run t