Package org.apache.myfaces.test.webapp.api.tester

Examples of org.apache.myfaces.test.webapp.api.tester.ServerSideCode


        // only phase PROCESS_VALIDATIONS must have been called
        // NOTE that there are also assertions in ValidationPhaseListener
        List<Boolean> assertList = Arrays.asList(false, false, true, false, false, false);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(ValidationPhaseListener.BEFORE_CALLED);
            }

        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here


        tester.assertThat("#{conversationBean1.input}").is(ConversationBean1.INPUT_DEFAULT_VALUE).after(PhaseId.RENDER_RESPONSE);

        tester.input("value1").into("testForm:inputConversationBean1");
        tester.click("testForm:redirectToTest2");

        tester.assertThat(new ServerSideCode(){

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                return facesContext.isPostback();
View Full Code Here

        // all phases must have been called
        // NOTE that there are also assertions in AllPhaseListener
        List<Boolean> assertList = Arrays.asList(true, true, true, true, true, true);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(AllPhaseListener.BEFORE_CALLED);
            }
           
        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        // only phase PROCESS_VALIDATIONS must have been called
        // NOTE that there are also assertions in ValidationPhaseListener
        List<Boolean> assertList = Arrays.asList(false, false, true, false, false, false);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(ValidationPhaseListener.BEFORE_CALLED);
            }

        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        // all phases must have been called
        // NOTE that there are also assertions in AllPhaseListener
        List<Boolean> assertList = Arrays.asList(true, true, true, true, true, true);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(AllPhaseListener.BEFORE_CALLED);
            }
           
        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        // only phase PROCESS_VALIDATIONS must have been called
        // NOTE that there are also assertions in ValidationPhaseListener
        List<Boolean> assertList = Arrays.asList(false, false, true, false, false, false);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(ValidationPhaseListener.BEFORE_CALLED);
            }

        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        tester.assertThat("#{conversationBean1.input}").is(ConversationBean1.INPUT_DEFAULT_VALUE).after(PhaseId.RENDER_RESPONSE);

        tester.input("value1").into("testForm:inputConversationBean1");
        tester.click("testForm:redirectToTest2");

        tester.assertThat(new ServerSideCode(){

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                return facesContext.isPostback();
View Full Code Here

        tester.assertThat("#{conversationBean1.input}").is(ConversationBean1.INPUT_DEFAULT_VALUE).after(PhaseId.RENDER_RESPONSE);

        tester.input("value1").into("testForm:inputConversationBean1");
        tester.click("testForm:redirectToTest2");

        tester.assertThat(new ServerSideCode(){

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                return facesContext.isPostback();
View Full Code Here

        // all phases must have been called
        // NOTE that there are also assertions in AllPhaseListener
        List<Boolean> assertList = Arrays.asList(true, true, true, true, true, true);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(AllPhaseListener.BEFORE_CALLED);
            }
           
        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

        // only phase PROCESS_VALIDATIONS must have been called
        // NOTE that there are also assertions in ValidationPhaseListener
        List<Boolean> assertList = Arrays.asList(false, false, true, false, false, false);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> applicationMap = facesContext
                        .getExternalContext().getApplicationMap();


                return applicationMap.get(ValidationPhaseListener.BEFORE_CALLED);
            }

        }).is(assertList).before(PhaseId.RESTORE_VIEW);

        tester.assertThat(new ServerSideCode()
        {

            public Object execute() throws Exception
            {
                FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

TOP

Related Classes of org.apache.myfaces.test.webapp.api.tester.ServerSideCode

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.