Package org.apache.jetspeed.mockobjects

Examples of org.apache.jetspeed.mockobjects.MockHttpServletRequest


        RequestContext request = new MockRequestContext("/");
        Set principals = new PrincipalsSet();
        principals.add(new RoleImpl("role"));
        request.setSubject(JetspeedSubjectFactory.createSubject(new UserImpl("user"), null, null, principals));
        request.setLocale(new Locale("en", "US"));
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        servletRequest.setServerName("www.domain.com");
        request.setRequest(servletRequest);
        try
        {
            ProfilingRule rule = profiler.getRule("subsite-by-hostname");
            assertNotNull(rule);
View Full Code Here


        // setup profiler and portal site to determine template
        // folders paths generate mock request for new user to profile
        RequestContext request = new MockRequestContext("/");
        request.setSubject(userManager.getSubject(user));
        request.setLocale((locale != null) ? locale : Locale.getDefault());
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        if (serverName != null)
        {
            servletRequest.setServerName(serverName);
        }
        request.setRequest(servletRequest);

        // get profile locators map for new user request, (taken from
        // ProfilerValveImpl)
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.mockobjects.MockHttpServletRequest

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.