Re: How to use ConfigParser()?

2007-05-17 Thread Paul Spencer

I found the problem.  The test was using a Tomahawk component.  Since
the ConfigParser does not load Tomahawk's JSF configuration, the render
was not defined.  My concerns around the absents of FacesContext where
unfounded because the context is not need when adding renderers.

Paul Spencer

Paul Spencer wrote:
I am trying to convert a test utility method that adds renders and other 
JSF components to the
ConfigParser in 1.1.0-SNAPSHOT, but I getting nulls from 
context.getRenderKit().getRenderer(...)


I have added the following in the utility method, which is NOT in an 
class that extends any of the
shale abstract test classes. The method is called by the test's setUp() 
after super.setUp().


ConfigParser parser = new ConfigParser();
URL[] urls = parser.getPlatformURLs();
parser.parse(urls);

Where the prior addRender() method passed FacesContext, I am not passing 
it to the ConfigParser.  Is
this the problem? See the addDefaultRenderers() method in the test 
utility class [1] for a more complete

example.

Paul Spencer

[1]http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?view=markup 







How to use ConfigParser()?

2007-05-10 Thread Paul Spencer

I am trying to convert a test utility method that adds renders and other JSF 
components to the
ConfigParser in 1.1.0-SNAPSHOT, but I getting nulls from 
context.getRenderKit().getRenderer(...)

I have added the following in the utility method, which is NOT in an class that 
extends any of the
shale abstract test classes. The method is called by the test's setUp() after 
super.setUp().

ConfigParser parser = new ConfigParser();
URL[] urls = parser.getPlatformURLs();
parser.parse(urls);

Where the prior addRender() method passed FacesContext, I am not passing it to 
the ConfigParser.  Is
this the problem? See the addDefaultRenderers() method in the test utility 
class [1] for a more complete
example.

Paul Spencer

[1]http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?view=markup