Skip to content

Instantly share code, notes, and snippets.

@ramapalani
Created March 27, 2014 00:41
Show Gist options
  • Save ramapalani/9797294 to your computer and use it in GitHub Desktop.
Save ramapalani/9797294 to your computer and use it in GitHub Desktop.
private static final AppDescriptor APP_DESCRIPTOR = new WebAppDescriptor.Builder()
.servletClass(SpringServlet.class)
.contextListenerClass(ContextLoaderListener.class)
//Use actual applicationContext.xml which will call actual service implementation
// .contextParam("contextConfigLocation",
// "classpath:applicationContext.xml")
//Use test application context.xml which will use actual resource but mock service
.contextParam("contextConfigLocation",
"classpath:testApplicationContext.xml")
.requestListenerClass(RequestContextListener.class).build();
public BaseJerseyTest() {
super(APP_DESCRIPTOR);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment