Search in sources :

Example 1 with AbstractTestExecutionListener

use of org.springframework.test.context.support.AbstractTestExecutionListener in project spring-security by spring-projects.

the class WithSecurityContextTestExcecutionListenerTests method orderOverridden.

// SEC-2709
@Test
public void orderOverridden() {
    AbstractTestExecutionListener otherListener = new AbstractTestExecutionListener() {
    };
    List<TestExecutionListener> listeners = new ArrayList<TestExecutionListener>();
    listeners.add(otherListener);
    listeners.add(this.listener);
    AnnotationAwareOrderComparator.sort(listeners);
    assertThat(listeners).containsSequence(this.listener, otherListener);
}
Also used : ArrayList(java.util.ArrayList) TestExecutionListener(org.springframework.test.context.TestExecutionListener) AbstractTestExecutionListener(org.springframework.test.context.support.AbstractTestExecutionListener) SqlScriptsTestExecutionListener(org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener) AbstractTestExecutionListener(org.springframework.test.context.support.AbstractTestExecutionListener) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1 TestExecutionListener (org.springframework.test.context.TestExecutionListener)1 SqlScriptsTestExecutionListener (org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener)1 AbstractTestExecutionListener (org.springframework.test.context.support.AbstractTestExecutionListener)1