myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Korherr <jakob.korh...@gmail.com>
Subject Re: svn commit: r943367 - /myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java
Date Wed, 12 May 2010 15:41:28 GMT
Hi Leonardo,

FYI: I fixed this test case in revision 943556. The problem was that
FacesContext.getApplication().getExpressionFactory() had to return a
MockExpressionFactory in order to work in the test case.

Regards,
Jakob

2010/5/12 <lu4242@apache.org>

> Author: lu4242
> Date: Wed May 12 03:57:33 2010
> New Revision: 943367
>
> URL: http://svn.apache.org/viewvc?rev=943367&view=rev
> Log:
> MYFACES-2711 Application.createComponent(FacesContext,Resource) register
> listeners twice and call createComponent(String) directly
>
> Modified:
>
>  myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java
>
> Modified:
> myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java
> URL:
> http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java?rev=943367&r1=943366&r2=943367&view=diff
>
> ==============================================================================
> ---
> myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java
> (original)
> +++
> myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/ApplicationImplJsfTest.java
> Wed May 12 03:57:33 2010
> @@ -100,6 +100,7 @@ public class ApplicationImplJsfTest exte
>                 MockViewDeclarationLanguageFactory.class.getName());
>         RuntimeConfig runtimeConfig = new RuntimeConfig();
>         _testApplication = new ApplicationImpl(runtimeConfig);
> +        facesContext.setApplication(_testApplication);
>     }
>
>     @Override
> @@ -220,17 +221,17 @@ public class ApplicationImplJsfTest exte
>         // this can be changed in the next release of MyFaces test
> (1.0.0-beta.NEXT)
>
>         // register the new component type
> -        _testApplication.addComponent(TEST_COMPONENT_TYPE,
> UIOutput.class.getName());
> +        //_testApplication.addComponent(TEST_COMPONENT_TYPE,
> UIOutput.class.getName());
>
>         // get the BeanInfo metadata
> -        metadata = vdl.getComponentMetadata(facesContext, resource);
> +        //metadata = vdl.getComponentMetadata(facesContext, resource);
>
>         // create the component
> -        component = _testApplication.createComponent(facesContext,
> resource);
> +        //component = _testApplication.createComponent(facesContext,
> resource);
>
>         // asserts for the fourth component
> -        assertTrue("The component has to be an instance of UIOutput",
> component instanceof UIOutput);
> -        assertRendererTypeResourceBeanInfo(component, resource, metadata);
> +        //assertTrue("The component has to be an instance of UIOutput",
> component instanceof UIOutput);
> +        //assertRendererTypeResourceBeanInfo(component, resource,
> metadata);
>     }
>
>  }
>
>
>


-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Mime
View raw message