Search in sources :

Example 1 with EzyExitedAppResponse

use of com.tvd12.ezyfoxserver.response.EzyExitedAppResponse in project ezyfox-server by youngmonkeys.

the class EzyExitedAppResponseTest method test.

@Test
public void test() {
    EzySimpleAppSetting setting = new EzySimpleAppSetting();
    EzyExitedAppParams params = new EzyExitedAppParams();
    params.setReason(EzyUserRemoveReason.EXIT_APP);
    params.setApp(setting);
    EzyExitedAppResponse response = new EzyExitedAppResponse(params);
    assert response.getParams() == params;
    assert response.getCommand() == EzyCommand.APP_EXIT;
    assert response.serialize().size() > 0;
    assert params.getApp() == setting;
    assert params.getReason() == EzyUserRemoveReason.EXIT_APP;
    response.release();
}
Also used : EzySimpleAppSetting(com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting) EzyExitedAppParams(com.tvd12.ezyfoxserver.response.EzyExitedAppParams) EzyExitedAppResponse(com.tvd12.ezyfoxserver.response.EzyExitedAppResponse) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 2 with EzyExitedAppResponse

use of com.tvd12.ezyfoxserver.response.EzyExitedAppResponse in project ezyfox-server by youngmonkeys.

the class EzySimpleAppUserDelegate method newExitedAppResponse.

protected EzyResponse newExitedAppResponse(EzyConstant reason) {
    EzyExitedAppParams params = new EzyExitedAppParams();
    EzyAppSetting appSetting = appContext.getApp().getSetting();
    params.setApp(appSetting);
    params.setReason(reason);
    return new EzyExitedAppResponse(params);
}
Also used : EzyExitedAppParams(com.tvd12.ezyfoxserver.response.EzyExitedAppParams) EzyAppSetting(com.tvd12.ezyfoxserver.setting.EzyAppSetting) EzyExitedAppResponse(com.tvd12.ezyfoxserver.response.EzyExitedAppResponse)

Aggregations

EzyExitedAppParams (com.tvd12.ezyfoxserver.response.EzyExitedAppParams)2 EzyExitedAppResponse (com.tvd12.ezyfoxserver.response.EzyExitedAppResponse)2 EzyAppSetting (com.tvd12.ezyfoxserver.setting.EzyAppSetting)1 EzySimpleAppSetting (com.tvd12.ezyfoxserver.setting.EzySimpleAppSetting)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1