Search in sources :

Example 1 with EzyRequestAppResponseParams

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

the class EzyAppSendResponseImpl method newResponse.

protected EzyResponse newResponse(EzyData data) {
    EzyAppSetting setting = context.getApp().getSetting();
    EzyRequestAppResponseParams params = new EzyRequestAppResponseParams();
    params.setAppId(setting.getId());
    params.setData(data);
    return new EzyRequestAppResponse(params);
}
Also used : EzyAppSetting(com.tvd12.ezyfoxserver.setting.EzyAppSetting) EzyRequestAppResponse(com.tvd12.ezyfoxserver.response.EzyRequestAppResponse) EzyRequestAppResponseParams(com.tvd12.ezyfoxserver.response.EzyRequestAppResponseParams)

Example 2 with EzyRequestAppResponseParams

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

the class EzyRequestAppResponseTest method test.

@Test
public void test() {
    EzyRequestAppResponseParams params = new EzyRequestAppResponseParams();
    EzyData data = EzyEntityFactory.EMPTY_ARRAY;
    params.setData(data);
    params.setAppId(1);
    assert params.getAppId() == 1;
    assert params.getData() == data;
    EzyRequestAppResponse response = new EzyRequestAppResponse(params);
    assert response.getParams() == params;
    assert response.getCommand() == EzyCommand.APP_REQUEST;
    assert response.serialize().size() > 0;
    response.release();
}
Also used : EzyData(com.tvd12.ezyfox.entity.EzyData) EzyRequestAppResponse(com.tvd12.ezyfoxserver.response.EzyRequestAppResponse) EzyRequestAppResponseParams(com.tvd12.ezyfoxserver.response.EzyRequestAppResponseParams) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzyRequestAppResponse (com.tvd12.ezyfoxserver.response.EzyRequestAppResponse)2 EzyRequestAppResponseParams (com.tvd12.ezyfoxserver.response.EzyRequestAppResponseParams)2 EzyData (com.tvd12.ezyfox.entity.EzyData)1 EzyAppSetting (com.tvd12.ezyfoxserver.setting.EzyAppSetting)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1