Search in sources :

Example 1 with EzyServerUserInterceptor

use of com.tvd12.ezyfoxserver.interceptor.EzyServerUserInterceptor in project ezyfox-server by youngmonkeys.

the class EzyServerUserInterceptorTest method test.

@Test(expectedExceptions = { EzyNotAuthorizedException.class })
public void test() throws Exception {
    EzyServerContext context = newServerContext();
    EzyServerUserInterceptor interceptor = new EzyServerUserInterceptor();
    EzyRequestAppRequest request = new EzySimpleRequestAppRequest();
    interceptor.intercept(context, request);
}
Also used : EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) EzySimpleRequestAppRequest(com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest) EzyRequestAppRequest(com.tvd12.ezyfoxserver.request.EzyRequestAppRequest) EzyServerUserInterceptor(com.tvd12.ezyfoxserver.interceptor.EzyServerUserInterceptor) BaseCoreTest(com.tvd12.ezyfoxserver.testing.BaseCoreTest) Test(org.testng.annotations.Test)

Example 2 with EzyServerUserInterceptor

use of com.tvd12.ezyfoxserver.interceptor.EzyServerUserInterceptor in project ezyfox-server by youngmonkeys.

the class EzyServerUserInterceptorTest method test1.

@Test
public void test1() throws Exception {
    EzyServerContext context = newServerContext();
    EzyServerUserInterceptor interceptor = new EzyServerUserInterceptor();
    EzySimpleRequestAppRequest request = new EzySimpleRequestAppRequest();
    request.setUser(new MyTestUser());
    interceptor.intercept(context, request);
}
Also used : EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) MyTestUser(com.tvd12.ezyfoxserver.testing.MyTestUser) EzySimpleRequestAppRequest(com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest) EzyServerUserInterceptor(com.tvd12.ezyfoxserver.interceptor.EzyServerUserInterceptor) BaseCoreTest(com.tvd12.ezyfoxserver.testing.BaseCoreTest) Test(org.testng.annotations.Test)

Aggregations

EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)2 EzyServerUserInterceptor (com.tvd12.ezyfoxserver.interceptor.EzyServerUserInterceptor)2 EzySimpleRequestAppRequest (com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest)2 BaseCoreTest (com.tvd12.ezyfoxserver.testing.BaseCoreTest)2 Test (org.testng.annotations.Test)2 EzyRequestAppRequest (com.tvd12.ezyfoxserver.request.EzyRequestAppRequest)1 MyTestUser (com.tvd12.ezyfoxserver.testing.MyTestUser)1