use of com.tvd12.ezyfoxserver.request.EzySimpleRequestPluginRequest in project ezyfox-server by youngmonkeys.
the class EzySimpleRequestAppRequestTest method test.
@Test
public void test() {
EzySimpleRequestPluginRequest request = new EzySimpleRequestPluginRequest();
request.deserializeParams(EzyEntityFactory.newArrayBuilder().append(1).append(EzyEntityFactory.newArrayBuilder()).build());
request.release();
}
use of com.tvd12.ezyfoxserver.request.EzySimpleRequestPluginRequest in project ezyfox-server by youngmonkeys.
the class EzyRequestPluginControllerTest method test.
@Test
public void test() {
EzyRequestPluginController controller = new EzyRequestPluginController();
EzyServerContext serverContext = mock(EzyServerContext.class);
EzyZoneContext zoneContext = mock(EzyZoneContext.class);
when(serverContext.getZoneContext(1)).thenReturn(zoneContext);
EzyPluginContext pluginContext = mock(EzyPluginContext.class);
when(zoneContext.getPluginContext(1)).thenReturn(pluginContext);
EzyPlugin plugin = mock(EzyPlugin.class);
when(pluginContext.getPlugin()).thenReturn(plugin);
EzyPluginRequestController requestController = mock(EzyPluginRequestController.class);
when(plugin.getRequestController()).thenReturn(requestController);
EzySimpleRequestPluginRequest request = new EzySimpleRequestPluginRequest();
EzyAbstractSession session = spy(EzyAbstractSession.class);
EzySimpleUser user = new EzySimpleUser();
user.setZoneId(1);
user.setId(1);
user.setName("test");
request.setSession(session);
request.setUser(user);
EzyArray array = EzyEntityFactory.newArrayBuilder().append(1).append(EzyEntityFactory.newArrayBuilder()).build();
request.deserializeParams(array);
controller.handle(serverContext, request);
}
Aggregations