Search in sources :

Example 1 with EzyDisconnectParams

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

the class EzyCloseSessionImpl method newResponse.

protected EzyResponse newResponse(EzyConstant reason) {
    EzyDisconnectParams params = new EzyDisconnectParams();
    params.setReason(reason);
    return new EzyDisconnectResponse(params);
}
Also used : EzyDisconnectParams(com.tvd12.ezyfoxserver.response.EzyDisconnectParams) EzyDisconnectResponse(com.tvd12.ezyfoxserver.response.EzyDisconnectResponse)

Example 2 with EzyDisconnectParams

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

the class EzyDisconnectResponseTest method test.

@Test
public void test() {
    EzyDisconnectParams params = new EzyDisconnectParams();
    params.setReason(EzyDisconnectReason.ADMIN_BAN);
    assert params.getReason() == EzyDisconnectReason.ADMIN_BAN;
    EzyDisconnectResponse response = new EzyDisconnectResponse(params);
    response.serialize();
    response.release();
}
Also used : EzyDisconnectParams(com.tvd12.ezyfoxserver.response.EzyDisconnectParams) EzyDisconnectResponse(com.tvd12.ezyfoxserver.response.EzyDisconnectResponse) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

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