1 Mar 2005 06:41
Re: Framework XML
Ian D. Stewart <idstewart <at> compuvative.com>
2005-03-01 05:41:49 GMT
2005-03-01 05:41:49 GMT
David Chelimsky wrote:
>OK, so when I'm developing a webapp using Struts, I like to use
>StrutsTestCase to test drive the development of Struts components. I'll
>start with something like this:
>
>
>
>public void testMappingExists() {
>
> setRequestPath("/somePath");
>
> actionPerform();
>
>}
>
>
>
>When I run that, it throws an error because there's no action mapping yet.
>So I add one to struts-config.xml and the test passes, verifying that
>configuration is set up the way I expect.
>
>
>
>So isn't this a unit test of the configuration file?
>
No, because you're not testing a unit. Neither the Action nor the
struts config are directly manipulated within your test. What you are
actually doing is testing the interaction between a number of units,
(Continue reading)
>
>Bob Evans
>

RSS Feed