myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: How to configure the default renderers and component within a Shale-Test based unit test
Date Mon, 21 Aug 2006 06:14:10 GMT
On 8/20/06, Dennis Byrne <dennis@dbyrne.net> wrote:
>
> >A more conservative approach would be to build an abstract base test case
> >that did the manual configuration operations (as you are doing them), for
> >the combination of components that you want to test, in its setUp()
> method.
>
> Hmmm ... so AbstractJsfTestCase would be extended by
> AbstractMyFacesTestCase?


Yes, that's the basic idea ... as long as the setUp() method in
AbstractMyFacesTestCase calls super.setUp() at the beginning, it can then
assume all the gory details of setting up the stuff AbstractJsfTestCase sets
up can be assumed to happen ... and you can focus on just configuring the
things unique to the Tomahawk component tests.  Then, presumably, the test
cases for individual components could subclass AbstractMyFacesTestCase
(although it maybe ought to be AbstractTomahawkTestCase instead?).

Craig

>Craig
>
> Dennis Byrne
>
> >>-----Original Message-----
> >> >From: Paul Spencer [mailto:paulsp@apache.org]
> >> >Sent: Sunday, August 20, 2006 11:42 PM
> >> >To: 'MyFaces Development'
> >> >Subject: How to configure the default renderers and component within a
> >> Shale-Test based unit test
> >> >
> >> >I am writing a unit test based on the Shale Test Framework for a
> Tomahawk
> >> >component.  My current problem is the I need to add the default
> MyFaces
> >> and
> >> >Tomahawk components and renderers to the FacesContext. To date I have
> >> been
> >> >using facesContext.getApplication().addComponent(...) and
> >> >facesContext.getRenderKit().addRenderer(...).  This is becoming very
> >> >cumbersome.  I know the defaults are out their in various
> configuration
> >> files,
> >> >but I do not know how to tell Shale's test framework how to use them.
> >> >
> >> >Suggestions?
> >> >
> >> >Paul Spencer
> >> >
> >> >
> >>
> >>
> >>
> >
>
>
>

Mime
View raw message