Issue
Is there a way to get a class that extends AbstractTransactionalJUnit4SpringContexts to play nicely with JUnit's own @RunWith(Parameterized.class), so that fields marked as Autowired get wired in properly?
@RunWith(Parameterized.class)
public class Foo extends AbstractTransactionalJUnit4SpringContextTests {
@Autowired private Bar bar
@Parameters public static Collection<Object[]> data() {
// return parameters, following pattern in
// http://junit.org/apidocs/org/junit/runners/Parameterized.html
}
@Test public void someTest(){
bar.baz() //NullPointerException
}
}
Solution
See http://jira.springframework.org/browse/SPR-5292 There is a solution.
Answered By - Michal Moravcik