Search in sources :

Example 11 with MockPageContext

use of org.springframework.mock.web.MockPageContext in project logging-log4j2 by apache.

the class LoggerAwareTagSupportTest method setUp.

private void setUp(final Object page) {
    this.context = new MockPageContext() {

        @Override
        public Object getPage() {
            return page == null ? this : page;
        }
    };
    this.tag = new LoggerAwareTagSupport() {

        private static final long serialVersionUID = 1L;
    };
    this.tag.setPageContext(this.context);
}
Also used : MockPageContext(org.springframework.mock.web.MockPageContext)

Aggregations

MockPageContext (org.springframework.mock.web.MockPageContext)11 Before (org.junit.Before)8 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)3 MockServletContext (org.springframework.mock.web.MockServletContext)3 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 JspWriter (javax.servlet.jsp.JspWriter)1 Level (org.apache.logging.log4j.Level)1 BeanDefinitionBuilder (org.springframework.beans.factory.support.BeanDefinitionBuilder)1 MockJspWriter (org.springframework.mock.web.MockJspWriter)1 PermissionEvaluator (org.springframework.security.access.PermissionEvaluator)1 WebApplicationContext (org.springframework.web.context.WebApplicationContext)1 StaticWebApplicationContext (org.springframework.web.context.support.StaticWebApplicationContext)1