Search in sources :

Example 1 with EzyInitable

use of com.tvd12.ezyfox.util.EzyInitable in project ezyfox-server by youngmonkeys.

the class BaseCoreTest method newServerContext.

protected EzyServerContext newServerContext() {
    EzyServerContext serverContext = newServerContextBuilder().build();
    for (EzyZoneContext zoneContext : serverContext.getZoneContexts()) {
        ((EzyInitable) zoneContext).init();
    }
    for (EzyAppContext appContext : serverContext.getAppContexts()) {
        ((EzyInitable) appContext).init();
    }
    EzySimpleServerContext ctx = (EzySimpleServerContext) serverContext;
    EzySimpleServer server = (EzySimpleServer) ctx.getServer();
    server.setResponseApi(mock(EzyResponseApi.class));
    return ctx;
}
Also used : EzyInitable(com.tvd12.ezyfox.util.EzyInitable) EzyZoneContext(com.tvd12.ezyfoxserver.context.EzyZoneContext) EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) EzySimpleServerContext(com.tvd12.ezyfoxserver.context.EzySimpleServerContext) EzyAppContext(com.tvd12.ezyfoxserver.context.EzyAppContext) EzyResponseApi(com.tvd12.ezyfoxserver.api.EzyResponseApi)

Aggregations

EzyInitable (com.tvd12.ezyfox.util.EzyInitable)1 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)1 EzyResponseApi (com.tvd12.ezyfoxserver.api.EzyResponseApi)1 EzyAppContext (com.tvd12.ezyfoxserver.context.EzyAppContext)1 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)1 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)1 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)1