Package org.apache.myfaces.config.element

Examples of org.apache.myfaces.config.element.FacesConfig


     *
     * @throws Exception
     */
    public void testMiddleOrdering() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
        "empty-config.xml"), "empty-config.xml");       
        org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl cfgA = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
        org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl cfgB = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
        org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl cfgC = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
        org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl cfgD = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
View Full Code Here


        }
    }
   
    public void testEx4() throws Exception
    {
        FacesConfig cfgA = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-a-config.xml"), "transitive-a-config.xml");
        FacesConfig cfgB = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-b-config.xml"), "transitive-b-config.xml");
        FacesConfig cfgC = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-c-config.xml"), "transitive-c-config.xml");
       
        List<FacesConfig> appConfigResources = new ArrayList<FacesConfig>();
        appConfigResources.add(cfgA);
        appConfigResources.add(cfgB);
View Full Code Here

        //printFacesConfigList("Sorted List", sortedList);
    }

    public void testBeforeOthers1() throws Exception
    {
        FacesConfig cfgA = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfgB = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfgC = _impl.getFacesConfig(getClass().getResourceAsStream(
            "before-others-config.xml"), "before-others-config.xml");
        FacesConfig cfgD = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");       
        FacesConfig cfgE = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");       
       
        List<FacesConfig> appConfigResources = new ArrayList<FacesConfig>();
        appConfigResources.add(cfgA);
        appConfigResources.add(cfgB);
View Full Code Here

        }
    }

    public void testAfterOthers1() throws Exception
    {
        FacesConfig cfgA = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfgB = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfgC = _impl.getFacesConfig(getClass().getResourceAsStream(
            "after-others-config.xml"), "after-others-config.xml");
        FacesConfig cfgD = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");       
        FacesConfig cfgE = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");       
       
        List<FacesConfig> appConfigResources = new ArrayList<FacesConfig>();
        appConfigResources.add(cfgA);
        appConfigResources.add(cfgB);
View Full Code Here

        }
    }
   
    public void testBeforeOthers2() throws Exception
    {
        FacesConfig cfg1 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfg2 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");
        FacesConfig cfg3 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "before-others-config.xml"), "before-others-config.xml");
        FacesConfig cfg4 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");       
        FacesConfig cfg5 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "no-name-config.xml"), "no-name-config.xml");    
        FacesConfig cfgA = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-a-config.xml"), "transitive-a-config.xml");
        FacesConfig cfgB = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-b-config.xml"), "transitive-b-config.xml");
        FacesConfig cfgC = _impl.getFacesConfig(getClass().getResourceAsStream(
            "transitive-c-config.xml"), "transitive-c-config.xml");
        FacesConfig cfg6 = _impl.getFacesConfig(getClass().getResourceAsStream(
            "after-others-config.xml"), "after-others-config.xml");
       
       
        List<FacesConfig> appConfigResources = new ArrayList<FacesConfig>();
        appConfigResources.add(cfgA);
View Full Code Here

        _impl = new DigesterFacesConfigUnmarshallerImpl(null);
    }

    public void testEmptyConfig() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
                "empty-config.xml"), "empty-config.xml");
        assertNotNull(cfg);
        assertTrue(cfg.getApplications().isEmpty());
        assertTrue(cfg.getComponents().isEmpty());
        assertTrue(cfg.getConverters().isEmpty());
        assertTrue(cfg.getFactories().isEmpty());
        assertTrue(cfg.getLifecyclePhaseListener().isEmpty());
        assertTrue(cfg.getManagedBeans().isEmpty());
        assertTrue(cfg.getNavigationRules().isEmpty());
        assertTrue(cfg.getRenderKits().isEmpty());
        assertTrue(cfg.getValidators().isEmpty());
    }
View Full Code Here

        assertTrue(cfg.getValidators().isEmpty());
    }

    public void testApplicationConfig() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
                "application-config.xml"), "application-config.xml");
        assertNotNull(cfg);
        assertEquals(1, cfg.getApplications().size());
        Application app = cfg.getApplications().get(0);
        assertEquals(2, app.getActionListener().size());
        assertEquals("action-listener1", app.getActionListener().get(0));
        assertEquals("action-listener2", app.getActionListener().get(1));
        assertEquals(1, app.getDefaultRenderkitId().size());
        assertEquals("default-render-kit-id", app.getDefaultRenderkitId()
View Full Code Here

        assertEquals("bb", cfg.getSupportedLocales().get(1));
    }
   
    public void testAbsoluteOrderingConfig() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
                "absolute-ordering-config.xml"), "absolute-ordering-config.xml");
        assertNotNull(cfg);
        assertEquals("true", cfg.getMetadataComplete());
        assertEquals("a",cfg.getName());

        List<OrderSlot> orderList = cfg.getAbsoluteOrdering().getOrderList();
       
        assertEquals("b", ((FacesConfigNameSlot) orderList.get(0)).getName());
        assertEquals("c", ((FacesConfigNameSlot) orderList.get(1)).getName());
        assertEquals(org.apache.myfaces.config.impl.digester.elements.ConfigOthersSlotImpl.class, orderList.get(2).getClass());
        assertEquals("d", ((FacesConfigNameSlot) orderList.get(3)).getName());
       
        assertTrue(cfg.getApplications().isEmpty());
        assertTrue(cfg.getComponents().isEmpty());
        assertTrue(cfg.getConverters().isEmpty());
        assertTrue(cfg.getFactories().isEmpty());
        assertTrue(cfg.getLifecyclePhaseListener().isEmpty());
        assertTrue(cfg.getManagedBeans().isEmpty());
        assertTrue(cfg.getNavigationRules().isEmpty());
        assertTrue(cfg.getRenderKits().isEmpty());
        assertTrue(cfg.getValidators().isEmpty());
    }
View Full Code Here

        assertTrue(cfg.getValidators().isEmpty());
    }
   
    public void testOrderingConfig() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
                "ordering-config.xml"), "ordering-config.xml");
        assertNotNull(cfg);
        assertEquals("a",cfg.getName());

        List<OrderSlot> orderList = cfg.getOrdering().getBeforeList();       
        assertEquals("b", ((FacesConfigNameSlot) orderList.get(0)).getName());
        assertEquals("c", ((FacesConfigNameSlot) orderList.get(1)).getName());
        assertEquals(org.apache.myfaces.config.impl.digester.elements.ConfigOthersSlotImpl.class, orderList.get(2).getClass());
       
        orderList = cfg.getOrdering().getAfterList();       
        assertEquals("d", ((FacesConfigNameSlot) orderList.get(0)).getName());
       
        assertTrue(cfg.getApplications().isEmpty());
        assertTrue(cfg.getComponents().isEmpty());
        assertTrue(cfg.getConverters().isEmpty());
        assertTrue(cfg.getFactories().isEmpty());
        assertTrue(cfg.getLifecyclePhaseListener().isEmpty());
        assertTrue(cfg.getManagedBeans().isEmpty());
        assertTrue(cfg.getNavigationRules().isEmpty());
        assertTrue(cfg.getRenderKits().isEmpty());
        assertTrue(cfg.getValidators().isEmpty());
    }
View Full Code Here

        assertEquals("value1", facesFlowParameter.getValue());*/
    }
   
    public void testCsrf() throws Exception
    {
        FacesConfig cfg = _impl.getFacesConfig(getClass().getResourceAsStream(
                "csrf-and-contracts.xml"), "csrf-and-contracts.xml");
       
        assertNotNull(cfg);
        assertEquals(2, cfg.getProtectedViewsUrlPatternList().size());
        assertEquals("/files/*.xhtml", cfg.getProtectedViewsUrlPatternList().get(0));
        assertEquals("/files2/*.xhtml", cfg.getProtectedViewsUrlPatternList().get(1));
       
       
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.config.element.FacesConfig

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.