use of com.tvd12.ezyfoxserver.command.impl.EzyAppSendResponseImpl in project ezyfox-server by youngmonkeys.
the class EzySimpleAppContext method doInit.
@Override
protected void doInit() {
EzySetup setup = new EzyAppSetupImpl(app);
this.sendResponse = new EzyAppSendResponseImpl(this);
this.properties.put(EzyAppSendResponse.class, sendResponse);
this.properties.put(EzyHandleException.class, new EzyAppHandleExceptionImpl(app));
this.properties.put(EzySetup.class, setup);
this.properties.put(EzyAppSetup.class, setup);
}
use of com.tvd12.ezyfoxserver.command.impl.EzyAppSendResponseImpl in project ezyfox-server by youngmonkeys.
the class EzyAppSendResponseImplTest method test.
@Test
public void test() {
EzyAppContext appContext = mock(EzyAppContext.class);
EzyApplication app = mock(EzyApplication.class);
when(appContext.getApp()).thenReturn(app);
EzySimpleAppSetting appSetting = new EzySimpleAppSetting();
appSetting.setName("test");
when(app.getSetting()).thenReturn(appSetting);
EzyZoneContext zoneContext = mock(EzyZoneContext.class);
when(appContext.getParent()).thenReturn(zoneContext);
EzyServerContext serverContext = mock(EzyServerContext.class);
when(zoneContext.getParent()).thenReturn(serverContext);
EzyAppSendResponseImpl cmd = new EzyAppSendResponseImpl(appContext);
EzyData data = EzyEntityFactory.newArrayBuilder().build();
EzyAbstractSession session = spy(EzyAbstractSession.class);
cmd.execute(data, session, false);
cmd.execute(data, Lists.newArrayList(session), false);
}
Aggregations