Search in sources :

Example 1 with SpringInterceptor

use of com.predic8.membrane.core.interceptor.SpringInterceptor in project service-proxy by membrane.

the class SpringReferencesTest method doit.

@Test
public void doit() {
    ServiceProxy p = (ServiceProxy) r.getRules().iterator().next();
    List<Interceptor> is = p.getInterceptors();
    Assert.assertEquals(LogInterceptor.class, is.get(0).getClass());
    Assert.assertEquals(LogInterceptor.class, is.get(1).getClass());
    Assert.assertEquals(LogInterceptor.class, is.get(2).getClass());
    Assert.assertEquals(SpringInterceptor.class, is.get(3).getClass());
    Assert.assertEquals(LogInterceptor.class, is.get(4).getClass());
    SpringInterceptor si = (SpringInterceptor) is.get(3);
    Assert.assertSame(is.get(1), is.get(2));
    Assert.assertSame(is.get(1), si.getInner());
}
Also used : ServiceProxy(com.predic8.membrane.core.rules.ServiceProxy) SpringInterceptor(com.predic8.membrane.core.interceptor.SpringInterceptor) Interceptor(com.predic8.membrane.core.interceptor.Interceptor) LogInterceptor(com.predic8.membrane.core.interceptor.LogInterceptor) SpringInterceptor(com.predic8.membrane.core.interceptor.SpringInterceptor) Test(org.junit.Test)

Aggregations

Interceptor (com.predic8.membrane.core.interceptor.Interceptor)1 LogInterceptor (com.predic8.membrane.core.interceptor.LogInterceptor)1 SpringInterceptor (com.predic8.membrane.core.interceptor.SpringInterceptor)1 ServiceProxy (com.predic8.membrane.core.rules.ServiceProxy)1 Test (org.junit.Test)1