use of com.tvd12.ezyfoxserver.command.impl.EzyPluginSendResponseImpl in project ezyfox-server by youngmonkeys.
the class EzyPluginSendResponseImplTest method test.
@Test
public void test() {
EzyPluginContext pluginContext = mock(EzyPluginContext.class);
EzyPlugin plugin = mock(EzyPlugin.class);
when(pluginContext.getPlugin()).thenReturn(plugin);
EzySimplePluginSetting pluginSetting = new EzySimplePluginSetting();
pluginSetting.setName("test");
when(plugin.getSetting()).thenReturn(pluginSetting);
EzyZoneContext zoneContext = mock(EzyZoneContext.class);
when(pluginContext.getParent()).thenReturn(zoneContext);
EzyServerContext serverContext = mock(EzyServerContext.class);
when(zoneContext.getParent()).thenReturn(serverContext);
EzyPluginSendResponseImpl cmd = new EzyPluginSendResponseImpl(pluginContext);
EzyObject data = EzyEntityFactory.newObjectBuilder().build();
EzyAbstractSession session = spy(EzyAbstractSession.class);
cmd.execute(data, session, false);
cmd.execute(data, Lists.newArrayList(session), false);
}
use of com.tvd12.ezyfoxserver.command.impl.EzyPluginSendResponseImpl in project ezyfox-server by youngmonkeys.
the class EzySimplePluginContext method doInit.
@Override
protected void doInit() {
EzySetup setup = new EzyPluginSetupImpl(plugin);
this.sendResponse = new EzyPluginSendResponseImpl(this);
this.properties.put(EzyPluginSendResponse.class, sendResponse);
this.properties.put(EzyHandleException.class, new EzyPluginHandleExceptionImpl(plugin));
this.properties.put(EzySetup.class, setup);
this.properties.put(EzyPluginSetup.class, setup);
}
Aggregations