Search in sources :

Example 1 with EzyExitAppController

use of com.tvd12.ezyfoxserver.controller.EzyExitAppController in project ezyfox-server by youngmonkeys.

the class EzyExitAppControllerTest method test.

@Test
public void test() {
    EzyExitAppController controller = new EzyExitAppController();
    EzyServerContext serverContext = mock(EzyServerContext.class);
    EzyAppContext appContext = mock(EzyAppContext.class);
    EzyApplication app = mock(EzyApplication.class);
    when(appContext.getApp()).thenReturn(app);
    EzyAppUserManager userManager = mock(EzyAppUserManager.class);
    when(app.getUserManager()).thenReturn(userManager);
    when(serverContext.getAppContext(1)).thenReturn(appContext);
    EzySimpleExitAppRequest request = new EzySimpleExitAppRequest();
    request.deserializeParams(EzyEntityFactory.newArrayBuilder().append(1).build());
    controller.handle(serverContext, request);
}
Also used : EzyApplication(com.tvd12.ezyfoxserver.EzyApplication) EzyAppUserManager(com.tvd12.ezyfoxserver.wrapper.EzyAppUserManager) EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) EzySimpleExitAppRequest(com.tvd12.ezyfoxserver.request.EzySimpleExitAppRequest) EzyAppContext(com.tvd12.ezyfoxserver.context.EzyAppContext) EzyExitAppController(com.tvd12.ezyfoxserver.controller.EzyExitAppController) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzyApplication (com.tvd12.ezyfoxserver.EzyApplication)1 EzyAppContext (com.tvd12.ezyfoxserver.context.EzyAppContext)1 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)1 EzyExitAppController (com.tvd12.ezyfoxserver.controller.EzyExitAppController)1 EzySimpleExitAppRequest (com.tvd12.ezyfoxserver.request.EzySimpleExitAppRequest)1 EzyAppUserManager (com.tvd12.ezyfoxserver.wrapper.EzyAppUserManager)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1