Search in sources :

Example 1 with MapConfigRequest

use of com.hazelcast.internal.management.request.MapConfigRequest in project hazelcast by hazelcast.

the class MapConfigRequestTest method testGetMapConfig.

@Test
public void testGetMapConfig() {
    MapConfigRequest request = new MapConfigRequest(mapName, dto, false);
    JsonObject jsonObject = new JsonObject();
    request.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    MapConfig mapConfig = (MapConfig) request.readResponse(result);
    assertNotNull(mapConfig);
    assertEquals("default", mapConfig.getName());
}
Also used : MapConfigRequest(com.hazelcast.internal.management.request.MapConfigRequest) JsonObject(com.eclipsesource.json.JsonObject) MapConfig(com.hazelcast.config.MapConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 2 with MapConfigRequest

use of com.hazelcast.internal.management.request.MapConfigRequest in project hazelcast by hazelcast.

the class MapConfigRequestTest method testUpdateMapConfig.

@Test
public void testUpdateMapConfig() {
    MapConfigRequest request = new MapConfigRequest(mapName, dto, true);
    JsonObject jsonObject = new JsonObject();
    request.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    assertEquals("success", request.readResponse(result));
}
Also used : MapConfigRequest(com.hazelcast.internal.management.request.MapConfigRequest) JsonObject(com.eclipsesource.json.JsonObject) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

JsonObject (com.eclipsesource.json.JsonObject)2 MapConfigRequest (com.hazelcast.internal.management.request.MapConfigRequest)2 ParallelTest (com.hazelcast.test.annotation.ParallelTest)2 QuickTest (com.hazelcast.test.annotation.QuickTest)2 Test (org.junit.Test)2 MapConfig (com.hazelcast.config.MapConfig)1