Package org.apache.myfaces.test.mock

Examples of org.apache.myfaces.test.mock.MockExternalContext


        ExceptionHandler exceptionHandler = ((ExceptionHandlerFactory)
                FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY)).getExceptionHandler();
        this.facesContext.setExceptionHandler(exceptionHandler);

        ((MockFacesContext) this.facesContext).setExternalContext(
                new MockExternalContext(this.servletContext, this.request, this.response));
    }
View Full Code Here


        FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY, MockRenderKitFactory.class.getName());
    }

    protected void initExternalContext() throws Exception
    {
        externalContext = new MockExternalContext(servletContext, request, response);
    }
View Full Code Here

       
        commandLink.setValue("outputdata");
       
        MockServletContext servletContext = new MockServletContext();
        servletContext.addInitParameter("org.apache.myfaces.ALLOW_JAVASCRIPT", "false");
        MockExternalContext mockExtCtx = new MockExternalContext(servletContext,
                new MockHttpServletRequest(), new MockHttpServletResponse());
        MyfacesConfig config = MyfacesConfig.getCurrentInstance(mockExtCtx);
        facesContext.setExternalContext(mockExtCtx);
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(
View Full Code Here

   
    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        //RuntimeConfig.getCurrentInstance(externalContext).setPropertyResolver(
        //        new PropertyResolverImpl());
        //RuntimeConfig.getCurrentInstance(externalContext).setVariableResolver(
        //        new VariableResolverImpl());
View Full Code Here

{
    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        RuntimeConfig.getCurrentInstance(externalContext).setExpressionFactory(
                new org.apache.el.ExpressionFactoryImpl());
    }
View Full Code Here

    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        // For this test we need the a real one, because the Mock does not
        // handle VariableMapper stuff properly and ui:param logic will not work
        RuntimeConfig.getCurrentInstance(externalContext).setExpressionFactory(
                new org.apache.el.ExpressionFactoryImpl());
View Full Code Here

   
    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        //RuntimeConfig.getCurrentInstance(externalContext).setPropertyResolver(
        //        new PropertyResolverImpl());
        //RuntimeConfig.getCurrentInstance(externalContext).setVariableResolver(
        //        new VariableResolverImpl());
View Full Code Here

    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        //RuntimeConfig.getCurrentInstance(externalContext).setPropertyResolver(
        //        new PropertyResolverImpl());
        //RuntimeConfig.getCurrentInstance(externalContext).setVariableResolver(
        //        new VariableResolverImpl());
View Full Code Here

   
    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        //RuntimeConfig.getCurrentInstance(externalContext).setPropertyResolver(
        //        new PropertyResolverImpl());
        //RuntimeConfig.getCurrentInstance(externalContext).setVariableResolver(
        //        new VariableResolverImpl());
View Full Code Here

   
    @Override
    protected void setUpExternalContext() throws Exception
    {
        externalContext =
            new MockExternalContext(servletContext, request, response);
       
        // For this test we need the a real one, because the Mock does not
        // handle VariableMapper stuff properly and ui:param logic will not work
        RuntimeConfig.getCurrentInstance(externalContext).setExpressionFactory(
                new org.apache.el.ExpressionFactoryImpl());
View Full Code Here

TOP

Related Classes of org.apache.myfaces.test.mock.MockExternalContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.