Search in sources :

Example 1 with SqlScriptsTestExecutionListener

use of org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener in project spring-security by spring-projects.

the class WithSecurityContextTestExcecutionListenerTests method withSecurityContextAfterSqlScripts.

// gh-3962
@Test
public void withSecurityContextAfterSqlScripts() {
    SqlScriptsTestExecutionListener sql = new SqlScriptsTestExecutionListener();
    WithSecurityContextTestExecutionListener security = new WithSecurityContextTestExecutionListener();
    List<? extends TestExecutionListener> listeners = Arrays.asList(security, sql);
    AnnotationAwareOrderComparator.sort(listeners);
    assertThat(listeners).containsExactly(sql, security);
}
Also used : SqlScriptsTestExecutionListener(org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 SqlScriptsTestExecutionListener (org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener)1