use of com.hazelcast.internal.management.request.ChangeWanStateRequest in project hazelcast by hazelcast.
the class ChangeWanStateRequestTest method testResumingWanState.
@Test
public void testResumingWanState() throws Exception {
ChangeWanStateRequest changeWanStateRequest = new ChangeWanStateRequest("schema", "publisher", true);
JsonObject jsonObject = new JsonObject();
changeWanStateRequest.writeResponse(managementCenterService, jsonObject);
JsonObject result = (JsonObject) jsonObject.get("result");
assertNotEquals(ChangeWanStateRequest.SUCCESS, changeWanStateRequest.readResponse(result));
}
use of com.hazelcast.internal.management.request.ChangeWanStateRequest in project hazelcast by hazelcast.
the class ChangeWanStateRequestTest method testPausingWanState.
@Test
public void testPausingWanState() throws Exception {
ChangeWanStateRequest changeWanStateRequest = new ChangeWanStateRequest("schema", "publisher", false);
JsonObject jsonObject = new JsonObject();
changeWanStateRequest.writeResponse(managementCenterService, jsonObject);
JsonObject result = (JsonObject) jsonObject.get("result");
assertNotEquals(ChangeWanStateRequest.SUCCESS, changeWanStateRequest.readResponse(result));
}
use of com.hazelcast.internal.management.request.ChangeWanStateRequest in project hazelcast by hazelcast.
the class ChangeWanStateRequestTest method testSerialization.
@Test
public void testSerialization() {
ChangeWanStateRequest changeWanStateRequest1 = new ChangeWanStateRequest("schema", "publisher", false);
JsonObject jsonObject = changeWanStateRequest1.toJson();
ChangeWanStateRequest changeWanStateRequest2 = new ChangeWanStateRequest();
changeWanStateRequest2.fromJson(jsonObject);
assertEquals(changeWanStateRequest1.getPublisherName(), changeWanStateRequest2.getPublisherName());
assertEquals(changeWanStateRequest1.getSchemeName(), changeWanStateRequest2.getSchemeName());
assertEquals(changeWanStateRequest1.isStart(), changeWanStateRequest2.isStart());
}
Aggregations