Java Code Examples for org.springframework.web.context.support.ServletContextAwareProcessor#postProcessBeforeInitialization()
The following examples show how to use
org.springframework.web.context.support.ServletContextAwareProcessor#postProcessBeforeInitialization() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletContextAwareWithNullServletContext() { ServletContext servletContext = null; ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletContext()); }
Example 2
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletConfigAwareWithServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 3
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletConfigAwareWithServletContextOnly() { ServletContext servletContext = new MockServletContext(); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletConfig()); }
Example 4
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletContextAwareWithNullServletContext() { ServletContext servletContext = null; ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletContext()); }
Example 5
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletContextAwareWithNonNullServletContextAndNullServletConfig() { ServletContext servletContext = new MockServletContext(); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext, null); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 6
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletContextAwareWithNullServletContextAndNonNullServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(null, servletConfig); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 7
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletContextAwareWithServletContextAndServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext, servletConfig); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 8
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletContextAwareWithServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletConfig); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 9
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletContextAwareWithServletContext() { ServletContext servletContext = new MockServletContext(); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 10
Source File: ServletContextAwareProcessorTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void servletConfigAwareWithNullServletContext() { ServletContext servletContext = null; ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletConfig()); }
Example 11
Source File: ServletContextAwareProcessorTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void servletConfigAwareWithServletContextAndServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext, servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 12
Source File: ServletContextAwareProcessorTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void servletConfigAwareWithNullServletContextAndNonNullServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(null, servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 13
Source File: ServletContextAwareProcessorTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void servletConfigAwareWithServletContextAndServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext, servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 14
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletContextAwareWithServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletConfig); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 15
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletConfigAwareWithServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 16
Source File: ServletContextAwareProcessorTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void servletContextAwareWithNullServletContext() { ServletContext servletContext = null; ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletContext()); }
Example 17
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletConfigAwareWithNullServletContextAndNonNullServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(null, servletConfig); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletConfig should have been set", bean.getServletConfig()); assertEquals(servletConfig, bean.getServletConfig()); }
Example 18
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletContextAwareWithServletContext() { ServletContext servletContext = new MockServletContext(); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 19
Source File: ServletContextAwareProcessorTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void servletContextAwareWithServletContextAndServletConfig() { ServletContext servletContext = new MockServletContext(); ServletConfig servletConfig = new MockServletConfig(servletContext); ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext, servletConfig); ServletContextAwareBean bean = new ServletContextAwareBean(); assertNull(bean.getServletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("ServletContext should have been set", bean.getServletContext()); assertEquals(servletContext, bean.getServletContext()); }
Example 20
Source File: ServletContextAwareProcessorTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void servletConfigAwareWithNullServletContext() { ServletContext servletContext = null; ServletContextAwareProcessor processor = new ServletContextAwareProcessor(servletContext); ServletConfigAwareBean bean = new ServletConfigAwareBean(); assertNull(bean.getServletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getServletConfig()); }