Search in sources :

Example 11 with EzyRequestQueue

use of com.tvd12.ezyfoxserver.socket.EzyRequestQueue 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)

Aggregations

EzySession (com.tvd12.ezyfoxserver.entity.EzySession)10 Test (org.testng.annotations.Test)9 EzyArray (com.tvd12.ezyfox.entity.EzyArray)6 EzyRequestQueue (com.tvd12.ezyfoxserver.socket.EzyRequestQueue)4 EzySessionTicketsRequestQueues (com.tvd12.ezyfoxserver.socket.EzySessionTicketsRequestQueues)2 EzySimpleSocketRequest (com.tvd12.ezyfoxserver.socket.EzySimpleSocketRequest)2 EzySocketRequest (com.tvd12.ezyfoxserver.socket.EzySocketRequest)2 EzyDroppedPackets (com.tvd12.ezyfoxserver.entity.EzyDroppedPackets)1 EzyImmediateDeliver (com.tvd12.ezyfoxserver.entity.EzyImmediateDeliver)1 EzySocketExtensionRequestHandler (com.tvd12.ezyfoxserver.socket.EzySocketExtensionRequestHandler)1 EzySocketSystemRequestHandler (com.tvd12.ezyfoxserver.socket.EzySocketSystemRequestHandler)1 EzyRequestFrameSecond (com.tvd12.ezyfoxserver.statistics.EzyRequestFrameSecond)1 BaseCoreTest (com.tvd12.ezyfoxserver.testing.BaseCoreTest)1 MyTestSession (com.tvd12.ezyfoxserver.testing.MyTestSession)1 InetSocketAddress (java.net.InetSocketAddress)1