Package org.springframework.mock.web.portlet

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


    assertNotNull("PortletContext should have been set", bean.getPortletContext());
    assertEquals(portletContext, bean.getPortletContext());
  }

  public void testPortletContextAwareWithPortletContextAndPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletConfig portletConfig = new MockPortletConfig(portletContext);
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, portletConfig);
    PortletContextAwareBean bean = new PortletContextAwareBean();
    assertNull(bean.getPortletContext());
    processor.postProcessBeforeInitialization(bean, "testBean");
View Full Code Here


    assertNotNull("PortletContext should have been set", bean.getPortletContext());
    assertEquals(portletContext, bean.getPortletContext());
  }

  public void testPortletContextAwareWithNullPortletContextAndNonNullPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletConfig portletConfig = new MockPortletConfig(portletContext);
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(null, portletConfig);
    PortletContextAwareBean bean = new PortletContextAwareBean();
    assertNull(bean.getPortletContext());
    processor.postProcessBeforeInitialization(bean, "testBean");
View Full Code Here

    assertNotNull("PortletContext should have been set", bean.getPortletContext());
    assertEquals(portletContext, bean.getPortletContext());
  }

  public void testPortletContextAwareWithNonNullPortletContextAndNullPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, null);
    PortletContextAwareBean bean = new PortletContextAwareBean();
    assertNull(bean.getPortletContext());
    processor.postProcessBeforeInitialization(bean, "testBean");
    assertNotNull("PortletContext should have been set", bean.getPortletContext());
View Full Code Here

    processor.postProcessBeforeInitialization(bean, "testBean");
    assertNull(bean.getPortletContext());
  }

  public void testPortletConfigAwareWithPortletContextOnly() {
    PortletContext portletContext = new MockPortletContext();
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext);
    PortletConfigAwareBean bean = new PortletConfigAwareBean();
    assertNull(bean.getPortletConfig());
    processor.postProcessBeforeInitialization(bean, "testBean");
    assertNull(bean.getPortletConfig());
View Full Code Here

    processor.postProcessBeforeInitialization(bean, "testBean");
    assertNull(bean.getPortletConfig());
  }

  public void testPortletConfigAwareWithPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletConfig portletConfig = new MockPortletConfig(portletContext);
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletConfig);
    PortletConfigAwareBean bean = new PortletConfigAwareBean();
    assertNull(bean.getPortletConfig());
    processor.postProcessBeforeInitialization(bean, "testBean");
View Full Code Here

    assertNotNull("PortletConfig should have been set", bean.getPortletConfig());
    assertEquals(portletConfig, bean.getPortletConfig());
  }

  public void testPortletConfigAwareWithPortletContextAndPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletConfig portletConfig = new MockPortletConfig(portletContext);
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, portletConfig);
    PortletConfigAwareBean bean = new PortletConfigAwareBean();
    assertNull(bean.getPortletConfig());
    processor.postProcessBeforeInitialization(bean, "testBean");
View Full Code Here

    assertNotNull("PortletConfig should have been set", bean.getPortletConfig());
    assertEquals(portletConfig, bean.getPortletConfig());
  }

  public void testPortletConfigAwareWithNullPortletContextAndNonNullPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletConfig portletConfig = new MockPortletConfig(portletContext);
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(null, portletConfig);
    PortletConfigAwareBean bean = new PortletConfigAwareBean();
    assertNull(bean.getPortletConfig());
    processor.postProcessBeforeInitialization(bean, "testBean");
View Full Code Here

    assertNotNull("PortletConfig should have been set", bean.getPortletConfig());
    assertEquals(portletConfig, bean.getPortletConfig());
  }

  public void testPortletConfigAwareWithNonNullPortletContextAndNullPortletConfig() {
    PortletContext portletContext = new MockPortletContext();
    PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, null);
    PortletConfigAwareBean bean = new PortletConfigAwareBean();
    assertNull(bean.getPortletConfig());
    processor.postProcessBeforeInitialization(bean, "testBean");
    assertNull(bean.getPortletConfig());
View Full Code Here

  private ConfigurablePortletApplicationContext pac;

  @Override
  public void setUp() throws Exception {
    MockPortletContext portletContext = new MockPortletContext();
    pac = new XmlPortletApplicationContext();
    pac.setPortletContext(portletContext);
    pac.setConfigLocations(new String[] {CONF});
    pac.refresh();
  }
View Full Code Here

  private ConfigurablePortletApplicationContext pac;

  @Override
  public void setUp() throws Exception {
    MockPortletContext portletContext = new MockPortletContext();
    pac = new XmlPortletApplicationContext();
    pac.setPortletContext(portletContext);
    pac.setConfigLocations(new String[] {CONF});
    pac.refresh();
  }
View Full Code Here

TOP

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

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.