Package org.impalaframework.web.facade

Examples of org.impalaframework.web.facade.AttributeServletContext


    }

    public void testDefault() throws Exception {
       
        GenericWebApplicationContext context = new GenericWebApplicationContext();
        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/defaultservletcontext.xml"));
       
        context.refresh();
View Full Code Here


    }
   
    public void testDispatcherServlet() throws Exception {
       
        GenericWebApplicationContext context = new GenericWebApplicationContext();
        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/dispatcherservletcontext.xml"));
       
        context.refresh();
View Full Code Here

    }
   
    public void testServlet() throws Exception {
       
        GenericWebApplicationContext context = new GenericWebApplicationContext();
        context.setServletContext(new AttributeServletContext());
       
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
        reader.loadBeanDefinitions(new ClassPathResource("org/impalaframework/web/spring/config/servletbeancontext.xml"));
       
        context.refresh();
View Full Code Here

        assertEquals("attribute", qualifier.getQualifiedAttributeName("shared:attribute", "", ""));
    }
   
    @SuppressWarnings("unchecked")
    public void testGetAttributeNames() throws Exception {
        AttributeServletContext realContext = new AttributeServletContext();
        realContext.setAttribute("application__module_mymodule:mykey", "value1");
        realContext.setAttribute("mykey", "value2");
        realContext.setAttribute("application__module_mymodule:anotherkey", "value3");
        realContext.setAttribute("anotherkey", "value2");
       
        Enumeration<String> names = (Enumeration<String>) realContext.getAttributeNames();
    Enumeration<String> attributeNames = qualifier.filterAttributeNames(names, "", "mymodule");
        ArrayList<String> list = Collections.list(attributeNames);
        assertEquals(CollectionStringUtils.parseStringList("application__module_mymodule:mykey,application__module_mymodule:anotherkey"), list);
    }
View Full Code Here

        servletContext = createMock(ServletContext.class);
        wrapperContext = new PartitionedServletContext(servletContext, "", "mymodule", new DefaultWebAttributeQualifier(), ClassUtils.getDefaultClassLoader());
    }
   
    public void testGetAttributeNames() throws Exception {
        AttributeServletContext realContext = new AttributeServletContext();
        realContext.setAttribute("application__module_mymodule:mykey", "value1");
        realContext.setAttribute("mykey", "value2");
        realContext.setAttribute("application__module_mymodule:anotherkey", "value3");
        realContext.setAttribute("anotherkey", "value2");
       
        wrapperContext = new PartitionedServletContext(realContext, "", "mymodule", new DefaultWebAttributeQualifier(), ClassUtils.getDefaultClassLoader());
        Enumeration<String> attributeNames = wrapperContext.getAttributeNames();
        ArrayList<String> list = Collections.list(attributeNames);
        assertEquals(CollectionStringUtils.parseStringList("application__module_mymodule:mykey,application__module_mymodule:anotherkey"), list);
View Full Code Here

TOP

Related Classes of org.impalaframework.web.facade.AttributeServletContext

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.