package demo;

import org.junit.Before;
import org.springframework.test.context.TestContextManager;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;

/**
 * @author renwc
 * @date 2018-01-05
 */
public abstract class BaseParametersTest extends AbstractTransactionalJUnit4SpringContextTests {
    private TestContextManager testContextManager;
    @Before
    public void setUpContext() throws Exception {
        //this is where the magic happens, we actually do "by hand" what the spring runner would do for us,
        // read the JavaDoc for the class bellow to know exactly what it does, the method names are quite accurate though
        this.testContextManager = new TestContextManager(getClass());
        this.testContextManager.prepareTestInstance(this);
    }

}
