OK, so maybe I have to learn more about the injection process. For all this talk about simplifying the process, it's starting to get complicated, but, hey, I'm flexible. ;-)
Can someone point me to a resource that would explain this in more detail? It sounds like I have to create a bunch of alternate delegates (that return different test values) to swap into place when testing my JSF Action method. Is that the idea? - Brendan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 11:49 AM To: user@struts.apache.org Subject: RE: [SHALE] Using the Test Framework CONNER, BRENDAN replied: > So are you agreeing that there is currently no framework that > can currently do round-trip testing as I've described it? Or > am I missing something? No, but I'm saying that you'll likely find it messy and difficult to mock out part of a big environment but include other parts. > Just trying to get a practical answer. ;-) I agree with Laurie that it's more practical to unit test in isolation, and then system test the entire system. If you cover all the boundary conditions with your unit tests, then the system testing is a lot more tractable. > - Brendan > > P.S. We *are* using delegates, DAO factories, etc. It just > would be nice to be able to test our code from the Action > method once those delegates have been filled in and are no > longer stubs. Stubs, fakes and mocks are subtly different things. For unit testing, I think you'll still want to inject a fake or a mock that behaves (and in the case of a mock, verifies the usage) the same as the real thing. Not only does this free you from difficult test setups, but it allows you to create conditions that may be impossible to create using the real thing. - George --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]