Search in sources :

Example 1 with EzyAccessAppErrorResponse

use of com.tvd12.ezyfoxserver.response.EzyAccessAppErrorResponse 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 2 with EzyAccessAppErrorResponse

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

the class EzyAccessAppController method newAccessAppErrorResponse.

protected EzyResponse newAccessAppErrorResponse(EzyIAccessAppError error) {
    EzyErrorParams params = new EzyErrorParams();
    params.setError(error);
    return new EzyAccessAppErrorResponse(params);
}
Also used : EzyErrorParams(com.tvd12.ezyfoxserver.response.EzyErrorParams) EzyAccessAppErrorResponse(com.tvd12.ezyfoxserver.response.EzyAccessAppErrorResponse)

Aggregations

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