John,
I'm not sure how you are setting up your tests, but I usually do something like:
Code:
public void setUp() {
String[] paths =
{ "/WEB-INF/ServletToTest-servlet.xml", };
ctx = new XmlWebApplicationContext();
ctx.setConfigLocations( paths );
ctx.setServletContext( new MockServletContext( "" ) );
ctx.refresh();
}
}
Then in the test, do something like:
Code:
public void testTheEvilBreakingCode () throws Exception {
ContToTestController cont = ( ContToTestController ) ctx.getBean( "contToTestController" );
... run some tests
}
Then, the fun begins.
Hope that helps... if not, I would be curious to see how you are setting up your tests.
Steve O