Package org.springframework.mock.web.portlet

Examples of org.springframework.mock.web.portlet.MockPortletPreferences


    }
   
    public void testRender() throws Exception
    {
        MockRenderRequest request = new MockRenderRequest(portletContext);
        MockPortletPreferences preferences = new MockPortletPreferences();
        request.setPreferences(preferences);
        request.addLocale(Locale.ENGLISH);
       
        MockRenderResponse response = new MockRenderResponse();
       
View Full Code Here


    }
   
    public void testProcessAction() throws Exception
    {
        MockActionRequest request = new MockActionRequest(portletContext);
        MockPortletPreferences preferences = new MockPortletPreferences();
       
        if (scriptPortlet.getValidatorInstance() != null)
        {
            preferences.setPreferencesValidator(scriptPortlet.getValidatorInstance());
        }
       
        request.setPreferences(preferences);
        request.addLocale(Locale.ENGLISH);
       
View Full Code Here

        springInitServlet.destroy();
    }
   
    public void testEscapedResult() throws PortletException, IOException
    {
        PortletPreferences preferences = new MockPortletPreferences();
        ((MockPortletPreferences) preferences).setValue("url", new ClassPathResource("/test-rss.xml").getURL().toString());
        ((MockPortletPreferences) preferences).setValue("itemdisplayed", "15");
        ((MockPortletPreferences) preferences).setValue("openinpopup", "true");
        ((MockPortletPreferences) preferences).setValue("showdescription", "true");
        ((MockPortletPreferences) preferences).setValue("showtitle", "true");
View Full Code Here

        assertTrue("The test line missing: " + TEST_LINE_ESCAPED, content.contains(TEST_LINE_ESCAPED));
    }
   
    public void testUnescapedResult() throws PortletException, IOException
    {
        PortletPreferences preferences = new MockPortletPreferences();
        ((MockPortletPreferences) preferences).setValue("url", new ClassPathResource("/test-rss.xml").getURL().toString());
        ((MockPortletPreferences) preferences).setValue("itemdisplayed", "15");
        ((MockPortletPreferences) preferences).setValue("openinpopup", "true");
        ((MockPortletPreferences) preferences).setValue("showdescription", "true");
        ((MockPortletPreferences) preferences).setValue("showtitle", "true");
View Full Code Here

TOP

Related Classes of org.springframework.mock.web.portlet.MockPortletPreferences

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.