use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class GetCMConfParameterTaskTest method testGetContents.
public void testGetContents() throws Exception {
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmconfpara_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
GetCMConfParameterTask task = new GetCMConfParameterTask(serverInfo);
task.setResponse(node);
task.getConfContents();
assertEquals("success", node.getValue("status"));
task.setResponse(null);
List<String> list = task.getConfContents();
assertNull(list);
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class GetCMUserListTaskTest method testReceive.
public void testReceive() throws Exception {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "y"))
return;
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
GetCMUserListTask task = new GetCMUserListTask(serverInfo);
task.setResponse(node);
task.getServerUserInfoList();
GetEnvInfoTask envTask = new GetEnvInfoTask(serverInfo);
envTask.setResponse(null);
envTask.loadEnvInfo();
//compare
assertEquals("success", node.getValue("status"));
//case2
filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive2");
msg = Tool.getFileContent(filepath);
node = MessageUtil.parseResponse(msg);
GetCMUserListTask task2 = new GetCMUserListTask(serverInfo);
task2.setResponse(node);
task2.getServerUserInfoList();
//case3
filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive3");
msg = Tool.getFileContent(filepath);
node = MessageUtil.parseResponse(msg);
GetCMUserListTask task3 = new GetCMUserListTask(serverInfo);
task3.setResponse(node);
task3.getServerUserInfoList();
//exception case1
task.setResponse(null);
task.getServerUserInfoList();
//exception case2
task.setResponse(node);
task.setErrorMsg("has error");
task.getServerUserInfoList();
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class GetCubridConfParameterTaskTest method testGetContents.
public void testGetContents() throws Exception {
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcubridconfpara_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
GetCubridConfParameterTask task = new GetCubridConfParameterTask(serverInfo);
task.setResponse(node);
task.getConfContents();
assertEquals("success", node.getValue("status"));
task.setResponse(null);
List<String> list = task.getConfContents();
assertNull(list);
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class GetHAConfParameterTaskTest method testGetContents.
public void testGetContents() throws Exception {
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/gethaconfpara_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
GetHAConfParameterTask task = new GetHAConfParameterTask(serverInfo);
task.setResponse(node);
task.getConfContents();
assertEquals("success", node.getValue("status"));
task.setResponse(null);
List<String> list = task.getConfContents();
assertNull(list);
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class ParamDumpTaskTest method testReceive.
public void testReceive() throws Exception {
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/cubrid/database/task/test.message/paramdump_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
ParamDumpTask task = new ParamDumpTask(serverInfo);
task.setResponse(node);
task.getContent();
task.setErrorMsg("err");
task.getContent();
task.setResponse(null);
task.getContent();
}
Aggregations