@Test public void defaultListeners() { List<Class<?>> expected = asList(ServletTestExecutionListener.class, DirtiesContextBeforeModesTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class, TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class); assertRegisteredListeners(DefaultListenersTestCase.class, expected); }
/** * @since 4.1 */ @Test public void defaultListenersMergedWithCustomListenerPrepended() { List<Class<?>> expected = asList(QuuxTestExecutionListener.class, ServletTestExecutionListener.class, DirtiesContextBeforeModesTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class, TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class); assertRegisteredListeners(MergedDefaultListenersWithCustomListenerPrependedTestCase.class, expected); }
/** * @since 4.1 */ @Test public void defaultListenersMergedWithCustomListenerAppended() { List<Class<?>> expected = asList(ServletTestExecutionListener.class, DirtiesContextBeforeModesTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class, TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class, BazTestExecutionListener.class); assertRegisteredListeners(MergedDefaultListenersWithCustomListenerAppendedTestCase.class, expected); }
/** * @since 4.1 */ @Test public void defaultListenersMergedWithCustomListenerInserted() { List<Class<?>> expected = asList(ServletTestExecutionListener.class, DirtiesContextBeforeModesTestExecutionListener.class, DependencyInjectionTestExecutionListener.class, BarTestExecutionListener.class, DirtiesContextTestExecutionListener.class, TransactionalTestExecutionListener.class, SqlScriptsTestExecutionListener.class); assertRegisteredListeners(MergedDefaultListenersWithCustomListenerInsertedTestCase.class, expected); }