Search in sources :

Example 1 with EzySocketSystemRequestHandler

use of com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler in project ezyfox-server by youngmonkeys.

the class EzySocketSystemRequestHandlerTest method test.

@Test
public void test() {
    EzySocketSystemRequestHandler handler = new EzySocketSystemRequestHandler();
    MethodInvoker.create().object(handler).method("getRequestType").invoke();
}
Also used : EzySocketSystemRequestHandler(com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler) Test(org.testng.annotations.Test)

Example 2 with EzySocketSystemRequestHandler

use of com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler in project ezyfox-server by youngmonkeys.

the class EzySocketSystemRequestHandlerTest method getRequestQueueTest.

@Test
public void getRequestQueueTest() {
    // given
    EzySocketSystemRequestHandler sut = new EzySocketSystemRequestHandler();
    EzySession session = mock(EzySession.class);
    EzyRequestQueue requestQueue = mock(EzyRequestQueue.class);
    when(session.getSystemRequestQueue()).thenReturn(requestQueue);
    // when
    EzyRequestQueue result = MethodInvoker.create().object(sut).method("getRequestQueue").param(EzySession.class, session).call();
    // then
    Asserts.assertEquals(requestQueue, result);
}
Also used : EzySession(com.tvd12.ezyfoxserver.entity.EzySession) EzySocketSystemRequestHandler(com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler) EzyRequestQueue(com.tvd12.ezyfoxserver.socket.EzyRequestQueue) Test(org.testng.annotations.Test)

Aggregations

EzySocketSystemRequestHandler (com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler)2 Test (org.testng.annotations.Test)2 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)1 EzyRequestQueue (com.tvd12.ezyfoxserver.socket.EzyRequestQueue)1