Search in sources :

Example 1 with EzyErrorParams

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

the class EzyLoginController method newLoginErrorResponse.

protected EzyResponse newLoginErrorResponse(EzyILoginError error) {
    EzyErrorParams params = new EzyErrorParams();
    params.setError(error);
    return new EzyLoginErrorResponse(params);
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyLoginErrorResponse(com.tvd12.ezyfoxserver.response.EzyLoginErrorResponse)

Example 2 with EzyErrorParams

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

the class EzyAbstractDataHandler method responseError.

protected void responseError() {
    EzyErrorParams params = new EzyErrorParams();
    params.setError(EzySessionError.MAX_REQUEST_PER_SECOND);
    response(new EzyErrorResponse(params));
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyErrorResponse(com.tvd12.ezyfoxserver.response.EzyErrorResponse)

Example 3 with EzyErrorParams

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

the class EzyRequestAppErrorResponseTest method test.

@Test
public void test() {
    EzyErrorParams params = new EzyErrorParams();
    params.setError(EzyRequestAppError.HAS_NOT_ACCESSED);
    EzyRequestAppErrorResponse response = new EzyRequestAppErrorResponse(params);
    assert response.getCommand() == EzyCommand.APP_REQUEST_ERROR;
    assert response.getParams() == params;
    response.release();
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyRequestAppErrorResponse(com.tvd12.ezyfoxserver.response.EzyRequestAppErrorResponse) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 4 with EzyErrorParams

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

the class EzyAccessAppErrorResponseTest method test.

@Test
public void test() {
    EzyErrorParams params = new EzyErrorParams();
    params.setCode(1);
    params.setMessage("m");
    params.setError(EzyAccessAppError.MAXIMUM_USER);
    assert params.getCode() == EzyAccessAppError.MAXIMUM_USER.getId();
    assert params.getMessage().equals(EzyAccessAppError.MAXIMUM_USER.getMessage());
    EzyAccessAppErrorResponse response = new EzyAccessAppErrorResponse(params);
    response.release();
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyAccessAppErrorResponse(com.tvd12.ezyfoxserver.response.EzyAccessAppErrorResponse) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 5 with EzyErrorParams

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

the class EzyRequestAppController method newRequestAppErrorResponse.

protected EzyResponse newRequestAppErrorResponse() {
    EzyErrorParams params = new EzyErrorParams();
    params.setError(EzyRequestAppError.HAS_NOT_ACCESSED);
    return new EzyRequestAppErrorResponse(params);
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyRequestAppErrorResponse(com.tvd12.ezyfoxserver.response.EzyRequestAppErrorResponse)

Aggregations

EzyErrorParams (com.tvd12.ezyfoxserver.response.EzyErrorParams)6 EzyAccessAppErrorResponse (com.tvd12.ezyfoxserver.response.EzyAccessAppErrorResponse)2 EzyRequestAppErrorResponse (com.tvd12.ezyfoxserver.response.EzyRequestAppErrorResponse)2 BaseTest (com.tvd12.test.base.BaseTest)2 Test (org.testng.annotations.Test)2 EzyErrorResponse (com.tvd12.ezyfoxserver.response.EzyErrorResponse)1 EzyLoginErrorResponse (com.tvd12.ezyfoxserver.response.EzyLoginErrorResponse)1