On 24 Apr, Vincent Massol wrote: >> In order to test properly, there needs to be >> a >> refactoring of the service method so that I can write a test for it >> specifically, without needing to have a container running that will > give >> me >> the correct home for the handler and all the rest of that. > > Do you mean you don't want to do Cactus testing but rather pure JUnit > (outside of the container) ? If so, why ? >
No, not at all. You answered my question later. >> Has anyone done >> anything similar? What type of refactoring did you do? >> > > yes, I have but I need to know more what's the intent. > You answer that later also. > Ok, you want to mock the Handler, right and only test the service() > method, is that it ? Exactly! Actually, I have to mock the handler because of the way service() is written. > If so, it is easy, simply mock > (http://www.mockobjects.com) EjbUtil. You'll need to refactor your > EjbUtil into a non-static class like : > <snip> Hey thanks! Let me study this and AspectJ to see which way to go. L -- Laurent Duperval <mailto:[EMAIL PROTECTED]> DENNISTON'S LAW Virtue is its own punishment. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
