Package org.jboss.portletbridge

Examples of org.jboss.portletbridge.MockPortletContext


   protected ExternalContext setupRequest() {
      setupActionRequest();
      request.setAttribute(Bridge.PORTLET_LIFECYCLE_PHASE, Bridge.PortletPhase.ActionPhase);
      request.setAttribute(AbstractExternalContext.PORTLET_CONFIG_ATTRIBUTE,
            portletConfig);
      PortletStateHolder portletStateHolder = PortletStateHolder.init(new MockPortletContext(servletContext));
      PortletWindowState portletState = new PortletWindowState(){

     @Override
     public BridgeConfig getBridgeConfig() {
       return new BridgeConfig(){
View Full Code Here


  /**
   * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parse(javax.portlet.PortletContext)}.
   */
  public void testParsePortletContext() {
    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

  /**
   * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseDefault(javax.portlet.PortletContext)}.
   */
  public void testParseDefault() 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

  /**
   * 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

    /* (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();
   PortletStateHolder portletStateHolder = PortletStateHolder.init(new MockPortletContext(servletContext));
   PortletWindowState portletState = new PortletWindowState(){

  @Override
  public BridgeConfig getBridgeConfig() {
    return new BridgeConfig(){
View Full Code Here

    /* (non-Javadoc)
     * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
     */
    public void setUp() throws Exception {
   super.setUp();
   PortletStateHolder portletStateHolder = PortletStateHolder.init(new MockPortletContext(servletContext));
   PortletWindowState portletState = new PortletWindowState(){

  @Override
  public BridgeConfig getBridgeConfig() {
    return null;
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();
   PortletStateHolder portletStateHolder = PortletStateHolder.init(new MockPortletContext(servletContext));
   PortletWindowState portletState = new PortletWindowState(){

  @Override
  public BridgeConfig getBridgeConfig() {
    return new BridgeConfig(){
View Full Code Here

  /**
   * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parse(javax.portlet.PortletContext)}.
   */
  public void testParsePortletContext() {
    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

  /**
   * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseDefault(javax.portlet.PortletContext)}.
   */
  public void testParseDefault() 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

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.