Package org.jboss.portletbridge

Examples of org.jboss.portletbridge.MockPortletContext


  /**
   * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseOptional(javax.portlet.PortletContext)}.
   */
  public void testParseOptional() throws Exception {
    FacesConfig config = new FacesConfig();
    MockPortletContext context = new MockPortletContext(new MockServletContext(){
      @Override
      public InputStream getResourceAsStream(String path) {
        return this.getClass().getResourceAsStream("/test"+path);
      }
     
View Full Code Here


        return super.getResources(name);
      }
    };
    Thread.currentThread().setContextClassLoader(classLoaderWrapper);
    FacesConfig config = new FacesConfig();
    MockPortletContext context = new MockPortletContext(new MockServletContext());
    config.parseClasspath(context);
    assertEquals(4, config.getExcludedAttributes().size());
    } finally {
      Thread.currentThread().setContextClassLoader(contextClassLoader);
    }
View Full Code Here

         * Test method for
         * {@link org.jboss.portletbridge.context.FacesContextFactoryImpl#getFacesContext(java.lang.Object, java.lang.Object, java.lang.Object, javax.faces.lifecycle.Lifecycle)}.
         */
    public void testGetFacesContextPortlet() {
   FacesContextFactoryImpl factory = new FacesContextFactoryImpl(facesContextFactory);
   MockPortletContext portletContext = new MockPortletContext(servletContext);
   MockActionRequest portletRequest = new MockActionRequest(portletContext);
   MockActionResponse portletResponse = new MockActionResponse();
   RequestScopeManager portletStateHolder = RequestScopeManager.getInstance(facesContext);
   BridgeRequestScope portletState = new BridgeRequestScope();
   portletStateHolder.saveRequestScope(STATE_ID, portletState);
View Full Code Here

    /* (non-Javadoc)
     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
     */
    public void setUp() throws Exception {
   super.setUp();
   portletContext=new MockPortletContext(servletContext);
   portletRequest = new MockActionRequest(portletContext);
   portletResponse = new MockActionResponse();
   RequestScopeManager portletStateHolder = RequestScopeManager.getInstance(facesContext);
   BridgeRequestScope portletState = new BridgeRequestScope(){
    
View Full Code Here

TOP

Related Classes of org.jboss.portletbridge.MockPortletContext

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.