use of com.tvd12.ezyfoxserver.command.impl.EzyPluginSetupImpl in project ezyfox-server by youngmonkeys.
the class EzyPluginSetupImplTest method test.
@Test
public void test() {
EzySimplePlugin plugin = new EzySimplePlugin();
EzyPluginSetupImpl cmd = new EzyPluginSetupImpl(plugin);
cmd.setRequestController((ctx, event) -> {
});
}
use of com.tvd12.ezyfoxserver.command.impl.EzyPluginSetupImpl in project ezyfox-server by youngmonkeys.
the class EzyPluginSetupImplTest method addEventControllerTest.
@SuppressWarnings("rawtypes")
@Test
public void addEventControllerTest() {
// given
EzySimplePlugin plugin = new EzySimplePlugin();
EzyEventControllers eventControllers = mock(EzyEventControllers.class);
plugin.setEventControllers(eventControllers);
EzyPluginSetupImpl sut = new EzyPluginSetupImpl(plugin);
EzyEventController controller = mock(EzyEventController.class);
// when
sut.addEventController(EzyEventType.SERVER_INITIALIZING, controller);
// then
verify(eventControllers, times(1)).addController(EzyEventType.SERVER_INITIALIZING, controller);
}
use of com.tvd12.ezyfoxserver.command.impl.EzyPluginSetupImpl 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