use of com.tvd12.ezyfoxserver.request.EzySimplePingRequest in project ezyfox-server by youngmonkeys.
the class EzyPingControllerTest method test.
@SuppressWarnings("rawtypes")
@Test
public void test() {
EzyPingController controller = new EzyPingController();
EzyServerContext serverContext = mock(EzyServerContext.class);
EzySimplePingRequest request = new EzySimplePingRequest();
controller.handle(serverContext, request);
EzySimpleSettings settings = new EzySimpleSettings();
EzyServer server = mock(EzyServer.class);
when(server.getSettings()).thenReturn(settings);
when(serverContext.getServer()).thenReturn(server);
assert MethodInvoker.create().object(controller).method("getSettings").param(EzyServerContext.class, serverContext).invoke() == settings;
EzySessionManager sessionManager = mock(EzySessionManager.class);
when(server.getSessionManager()).thenReturn(sessionManager);
assert MethodInvoker.create().object(controller).method("getSessionManager").param(EzyServerContext.class, serverContext).invoke() == sessionManager;
EzyZoneContext zoneContext = mock(EzyZoneContext.class);
EzyZone zone = mock(EzyZone.class);
when(zoneContext.getZone()).thenReturn(zone);
EzyZoneUserManager zoneUserManager = mock(EzyZoneUserManager.class);
when(zone.getUserManager()).thenReturn(zoneUserManager);
assert MethodInvoker.create().object(controller).method("getUserManager").param(EzyZoneContext.class, zoneContext).invoke() == zoneUserManager;
}
use of com.tvd12.ezyfoxserver.request.EzySimplePingRequest in project ezyfox-server by youngmonkeys.
the class EzySimplePingRequestTest method test.
@Test
public void test() {
EzySimplePingRequest rq = new EzySimplePingRequest();
rq.deserializeParams(null);
rq.release();
}
Aggregations