Example usage for org.springframework.mock.web MockServletContext setMinorVersion

List of usage examples for org.springframework.mock.web MockServletContext setMinorVersion

Introduction

In this page you can find the example usage for org.springframework.mock.web MockServletContext setMinorVersion.

Prototype

public void setMinorVersion(int minorVersion) 

Source Link

Usage

From source file:org.parancoe.web.test.BaseTest.java

@Override
protected ConfigurableApplicationContext createApplicationContext(String[] locations) {
    FileSystemResourceLoader rl = new FileSystemResourceLoader();
    MockServletContext servletContext = new MockServletContext(rl);
    servletContext.setMinorVersion(4);
    servletContext.registerContext("/test", servletContext);
    servletContext.setServletContextName("/test");
    servletContext.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, arrayToString(locations));
    ContextLoader loader = new ContextLoader();
    WebApplicationContext context = loader.initWebApplicationContext(servletContext);
    return (ConfigurableApplicationContext) context;
}