super(xmlRpcClient, devKey);
}
protected TestPlan createTestPlan(String planName, String projectName, String notes, Boolean isActive,
Boolean isPublic) throws TestLinkAPIException {
TestPlan testPlan = null;
Integer id = 0;
testPlan = new TestPlan(id, planName, projectName, notes, isActive, isPublic);
try {
Map<String, Object> executionData = Util.getTestPlanMap(testPlan);
Object response = this.executeXmlRpcCall(TestLinkMethods.CREATE_TEST_PLAN.toString(), executionData);
Object[] responseArray = (Object[]) response;
Map<String, Object> responseMap = (Map<String, Object>) responseArray[0];
id = Util.getInteger(responseMap, TestLinkResponseParams.ID.toString());
testPlan.setId(id);
} catch (XmlRpcException xmlrpcex) {
throw new TestLinkAPIException("Error creating test plan: " + xmlrpcex.getMessage(), xmlrpcex);
}
return testPlan;