Package org.jboss.jsfunit.jsfsession

Examples of org.jboss.jsfunit.jsfsession.JSFSession


   }

   @Test
   public void shouldExecutePage() throws Exception
   {
      JSFSession jsfSession = new JSFSession("/index.jsf");

      Assert.assertTrue(Environment.is12Compatible());
      Assert.assertTrue(Environment.is20Compatible());
      Assert.assertEquals(2, Environment.getJSFMajorVersion());
      Assert.assertEquals(0, Environment.getJSFMinorVersion());

      JSFServerSession server = jsfSession.getJSFServerSession();

      Assert.assertEquals("request", server.getManagedBeanValue("#{requestBean.scope}"));
   }
View Full Code Here


   }

   @Test
   public void shouldExecutePage2() throws Exception
   {
      JSFSession jsfSession = new JSFSession("/index.jsf");

      Assert.assertTrue(Environment.is12Compatible());
      Assert.assertTrue(Environment.is20Compatible());
      Assert.assertEquals(2, Environment.getJSFMajorVersion());
      Assert.assertEquals(0, Environment.getJSFMinorVersion());

      JSFServerSession server = jsfSession.getJSFServerSession();

      Assert.assertEquals("request", server.getManagedBeanValue("#{requestBean.scope}"));
   }
View Full Code Here

    // Always press OK for confirm dialogs
    wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));

    wcSpec.setInitialRequestStrategy(new JoprLoginStrategy()); // logs in

    JSFSession jsfSession = new JSFSession(wcSpec);
    this.client = jsfSession.getJSFClientSession();
    this.server = jsfSession.getJSFServerSession();
  }
View Full Code Here

      // Initial JSF request
      WebClientSpec wcSpec = new WebClientSpec("/", BrowserVersion.FIREFOX_3);
      wcSpec.getWebClient().setThrowExceptionOnFailingStatusCode(false);
      wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));
      wcSpec.setInitialRequestStrategy(new JoprLoginStrategy(user, pass)); // logs in
      this.jsfSession = new JSFSession(wcSpec);
      this.client_ = jsfSession.getJSFClientSession();
      this.server_ = jsfSession.getJSFServerSession();
    }
View Full Code Here

        wcSpec.setInitialRequestStrategy(new JoprLoginStrategy( this.getLoginUser(), this.getLoginPass())); // logs in

        this.webClient = wcSpec.getWebClient();
       
        JSFSession jsfSession = new JSFSession(wcSpec);
        this.client = jsfSession.getJSFClientSession();
        this.server = jsfSession.getJSFServerSession();

        this.ejtt = new EmbJoprTestToolkit(client, server);
        this.ejtt.setCurrentTest(this);
    }
View Full Code Here

TOP

Related Classes of org.jboss.jsfunit.jsfsession.JSFSession

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.