List of usage examples for org.springframework.web.servlet SimpleWebApplicationContext refresh
@Override public void refresh() throws BeansException
From source file:org.openmrs.web.taglib.OpenmrsMessageTagTest.java
@Before public void createMockPageContext() throws Exception { MockServletContext sc = new MockServletContext(); SimpleWebApplicationContext wac = new SimpleWebApplicationContext(); wac.setServletContext(sc);//from w ww . j a va 2s .c o m wac.setNamespace("test"); wac.refresh(); MockHttpServletRequest request = new MockHttpServletRequest(sc); request.addPreferredLocale(Context.getLocale()); MockHttpServletResponse response = new MockHttpServletResponse(); request.setAttribute(DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE, wac); openmrsMessageTag = new OpenmrsMessageTag(); mockPageContext = new MockPageContext(sc, request, response); openmrsMessageTag.setPageContext(mockPageContext); }