Search in sources :

Example 1 with EzySocketExtensionRequestHandler

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

the class EzySocketExtensionRequestHandlerTest method getRequestQueueTest.

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

Example 2 with EzySocketExtensionRequestHandler

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

the class EzySocketExtensionRequestHandlerTest method test.

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

Aggregations

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