Code Snippet

Just another Code Snippet site

[JUnit] Combined Parametrized Test and Autowiring (Spring)

@RunWith(Parameterized.class)
public class ParametrizedTest  {

    private TestContextManager testContextManager;

    @Before
    public void setUpStringContext() throws Exception {
        testContextManager = new TestContextManager(getClass());
        testContextManager.prepareTestInstance(this);
    }

    @Parameters(name = "{1}")
    public static Collection<Object[]> data() {
        // TODO return ...
    }

    @Test
    public void test1() {
        // TODO ...
    }

}

,


Comments are currently closed.