/** * Sets up thread-local state before each test method via Spring Web's * {@link RequestContextHolder}, but only if the * {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#beforeTestMethod(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void beforeTestMethod(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }
/** * Sets up thread-local state during the <em>test instance preparation</em> * callback phase via Spring Web's {@link RequestContextHolder}, but only if * the {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#prepareTestInstance(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void prepareTestInstance(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }
/** * Sets up thread-local state before each test method via Spring Web's * {@link RequestContextHolder}, but only if the * {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#beforeTestMethod(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void beforeTestMethod(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }
/** * Sets up thread-local state before each test method via Spring Web's * {@link RequestContextHolder}, but only if the * {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#beforeTestMethod(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void beforeTestMethod(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }
/** * Sets up thread-local state during the <em>test instance preparation</em> * callback phase via Spring Web's {@link RequestContextHolder}, but only if * the {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#prepareTestInstance(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void prepareTestInstance(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }
/** * Sets up thread-local state during the <em>test instance preparation</em> * callback phase via Spring Web's {@link RequestContextHolder}, but only if * the {@linkplain TestContext#getTestClass() test class} is annotated with * {@link WebAppConfiguration @WebAppConfiguration}. * @see TestExecutionListener#prepareTestInstance(TestContext) * @see #setUpRequestContextIfNecessary(TestContext) */ @Override public void prepareTestInstance(TestContext testContext) throws Exception { setUpRequestContextIfNecessary(testContext); }