> On 9/17/05, Gary VanMatre wrote: 
> > 
> > I was thinking that it might be helpful to have some protected factory 
> > methods on the AbstractJsfTestCase for instantiating the environment mock 
> > objects like request, response, faces context, ... 
> 
> 
> I can see why one might want to do that, if the default implementations that 
> AbstractJsfTestCase wires up are insufficient. I haven't found that to be 
> the case ... have you? If so, I would think we'd want to enhance the 
> functionality of the framework's mock objects where appropriate, no matter 
> what we do about adding protected methods to the abstract test case class. 
> 

I've had to change the behavior to getResource(String path) on the servlet 
context for the clay config test case.  The remote usecase test cases also 
implement the response getWriter().  The rolodex test case also extends the 
external context (This one is kind of a kluge).   

> This would be a place that you could override and provide your own mock 
> > implementation for a test case and not have to try to hookup all the 
> > references. 
> 
> 
> My only concern is that having an application provide its own mock objects, 
> instead of using the ones provided by the test framework (which will have 
> presumably been tested fairly extensively due to wide use) would lead to a 
> potential for hidden bugs due to flaws in the application's mock object 
> implementation classes. 
> 

True, we don't want to have to write a test to test our test :-)

Gary


> Any thought? 
> > 
> > Gary 
> > 
> 
> Craig 
> 

Reply via email to