Search in sources :

Example 1 with EzyAddExceptionHandlerImpl

use of com.tvd12.ezyfoxserver.command.impl.EzyAddExceptionHandlerImpl in project ezyfox-server by youngmonkeys.

the class EzyAddExceptionHandlerImplTest method test.

@Test
public void test() {
    EzyExceptionHandlersFetcher fetcher = mock(EzyExceptionHandlersFetcher.class);
    EzyExceptionHandlers handlers = mock(EzyExceptionHandlers.class);
    when(fetcher.getExceptionHandlers()).thenReturn(handlers);
    EzyAddExceptionHandlerImpl cmd = new EzyAddExceptionHandlerImpl(fetcher);
    cmd.add(mock(EzyExceptionHandler.class));
}
Also used : EzyExceptionHandlers(com.tvd12.ezyfox.util.EzyExceptionHandlers) EzyExceptionHandler(com.tvd12.ezyfox.util.EzyExceptionHandler) EzyAddExceptionHandlerImpl(com.tvd12.ezyfoxserver.command.impl.EzyAddExceptionHandlerImpl) EzyExceptionHandlersFetcher(com.tvd12.ezyfox.util.EzyExceptionHandlersFetcher) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 2 with EzyAddExceptionHandlerImpl

use of com.tvd12.ezyfoxserver.command.impl.EzyAddExceptionHandlerImpl in project ezyfox-server by youngmonkeys.

the class EzyAbstractContext method init.

@Override
public final void init() {
    this.commandSuppliers = defaultCommandSuppliers();
    this.handleException = new EzyHandleExceptionImpl(component);
    this.properties.put(EzyHandleException.class, handleException);
    this.properties.put(EzyAddCommand.class, new EzyAddCommandImpl(this));
    this.properties.put(EzyAddExceptionHandler.class, new EzyAddExceptionHandlerImpl(component));
    this.doInit();
}
Also used : EzyAddExceptionHandlerImpl(com.tvd12.ezyfoxserver.command.impl.EzyAddExceptionHandlerImpl) EzyHandleExceptionImpl(com.tvd12.ezyfoxserver.command.impl.EzyHandleExceptionImpl) EzyAddCommandImpl(com.tvd12.ezyfoxserver.command.impl.EzyAddCommandImpl)

Aggregations

EzyAddExceptionHandlerImpl (com.tvd12.ezyfoxserver.command.impl.EzyAddExceptionHandlerImpl)2 EzyExceptionHandler (com.tvd12.ezyfox.util.EzyExceptionHandler)1 EzyExceptionHandlers (com.tvd12.ezyfox.util.EzyExceptionHandlers)1 EzyExceptionHandlersFetcher (com.tvd12.ezyfox.util.EzyExceptionHandlersFetcher)1 EzyAddCommandImpl (com.tvd12.ezyfoxserver.command.impl.EzyAddCommandImpl)1 EzyHandleExceptionImpl (com.tvd12.ezyfoxserver.command.impl.EzyHandleExceptionImpl)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1