2 Replies Latest reply on Dec 17, 2007 6:58 PM by Tim Evers

    assert server.getCurrentViewID()

    Tim Evers Master

      I have the following test (just learning how to use it)

      public class JSFUnitTest extends org.apache.cactus.ServletTestCase {
       public static Test suite()
       return new TestSuite( JSFUnitTest.class );
       public void testInitialPage() throws IOException, SAXException
       // Send an HTTP request for the initial page
       JSFClientSession client = new JSFClientSession("/web/index.jsf");
       // A JSFServerSession gives you access to JSF state
       JSFServerSession server = new JSFServerSession(client);
       // Test navigation to initial viewID
       assertEquals("/web/index.xhtml", server.getCurrentViewID());

      Why is it that I navigate to /web/index.jsf that I have to assert that my view is /web/index.xhtml.

      Why can't I assert that my view is the jsf page?

      If this is just how it works so be it.....but just seems a tad weird :)